Robert and Steve Chávez
33532cfbb6
Fix hlint warnings for hlint v2.1.20 ( #1320 )
...
* Apply some hlint suggestions.
* Simplify config parser (to avoid hlint error)
* Reorganize for clarity (and fix hlint error)
* Remove redundant language extension
* Reformat slice more conventionally to avoid hlint bug
* Refactor for clarity (and to avoid hlint error)
* Simplify (and avoid hlint error)
* Fix hlint complaint
2019-06-08 20:52:48 -05:00
Dan Amoroso and Steve Chávez
78e5677fbe
Add server-unix-socket config option ( #1303 )
...
Add ncat workaround to test socket connection on CircleCI
2019-06-05 12:57:47 -05:00
Robert and Steve Chávez
e292fb5eb9
Replace configurator-ng by configurator-pg ( #1312 )
...
The change should not affect parse results for valid
configuration files. Error messages should be somewhat
improved.
2019-06-04 15:49:37 -05:00
Robert Vollmert and Steve Chávez
ea2f89e234
Fix non-exhaustive pattern match warning by duplicating a line.
2019-05-29 11:26:58 -05:00
Xavier Francisco and Steve Chávez
28b3d6cafd
Update stylish haskell config; apply all; add CI config ( #1299 )
...
* Update config default; Copy non-defaults
* Update .stylish-haskell config version to match pgrst
* Apply stylish haskell to all files
* CircleCI config
* Remove redundant import.
What is used from Network.HTTP.Types.Headers is also exported by Network.HTTP.Types.
* Grouped imports
* Show un-styled files on CircleCI failure
* Fix styling imports
* Apply adhoc standard correctly
2019-05-23 10:44:34 -05:00
Xavier Francisco and Steve Chávez
1cf54e6575
Small refactor around error responses and more tests ( #1282 )
...
* Fix #880 , Clean and consolidate error responses
* Fix #1285 , Abort on fatal errors
* Add / Detail tests
2019-05-22 09:30:33 -05:00
steve-chavez
3c7738a8c7
Deprecate '.' for disambiguating resource embedding
...
'+' should be used instead.
2019-05-19 13:18:03 -05:00
steve-chavez
181b608c04
Change server-host default of 127.0.0.1 to !4
...
This way the server works in LAN settings by default.
2019-05-19 13:18:03 -05:00
Xavier Francisco and Steve Chávez
d32f373e1e
Add config option for pool timeout ( #1280 )
2019-04-25 12:23:20 -05:00
steve-chavez
2044f77d49
Fix #1273 , don't ignore RPC arguments by default
...
* Add different error message for pg 9.4
2019-04-19 16:03:42 -05:00
steve-chavez
033ee5a06e
Refactor: remove pjKeys from RawJSON
2019-04-19 16:03:42 -05:00
Xavier Francisco and Steve Chávez
553531711b
Fix wrong status 404 when PATCH request didn't change anything ( #1272 )
2019-04-19 13:50:19 -05:00
Xavier Francisco and Steve Chávez
74e38a1d80
Fix invalid SQL generated for bulk upsert with empty array ( #1270 )
2019-04-12 23:26:36 -05:00
Xavier Francisco and Steve Chávez
32725f2f35
Fix tests expected responses due to changes in pg11 ( #1268 )
2019-04-07 19:03:02 -05:00
steve-chavez
bdfb11001e
Fix #1264 , allow bulk RPC call
2019-04-05 19:10:00 -05:00
fpusch and Steve Chávez
cefbe8f07f
Add numeric and character types to OpenAPI spec ( #1259 )
...
* Add numeric and character types
* Remove decimal type mapping
It is treated as numeric by PostgreSQL so the mapping was redundant.
2019-03-29 11:09:42 -05:00
Vitor Baptista and Steve Chávez
9387e70b66
Fixes #1239 , support resource embedding on materialized views
2019-03-14 16:59:55 -05:00
steve-chavez
1f513f24a5
Fix #1242 , embed a view having a select in a where
2019-03-09 16:03:26 -05:00
steve-chavez
c9b2830e52
Fix #690 , add columns query arg for RPC/POST/PATCH
...
* Refactor normalizing json CTE
* Refactor CTE to use CASE instead of UNION
2019-02-26 11:38:21 -05:00
steve-chavez
3946dfbc64
Remove pjIsEmpty and rm pjType from ActionInvoke
...
* Remove PayloadJSON from Insert/Update
2019-02-26 11:38:21 -05:00
steve-chavez
50509b52b8
Fix POST/PATCH error on a [{}] json
2019-02-26 11:38:21 -05:00
steve-chavez
16059ad470
Remove pjType from ActionCreate
...
* Remove isSingle from ActionCreate
* Remove nRows from ActionCreate
2019-02-26 11:38:21 -05:00
steve-chavez
00a0d8b9b7
Remove pjType from QueryBuilder Insert/Update
...
* Refactor Insert onConflict
2019-02-26 11:38:21 -05:00
steve-chavez
673aa25082
Fix #1221 , embedding when having a self join
2019-02-04 10:22:02 -05:00
steve-chavez
1037313e77
Add comments to modules
2019-02-04 10:22:02 -05:00
steve-chavez
86e460c5c4
Add implicitJoins to ReadQuery type
2019-02-04 10:22:02 -05:00
steve-chavez
fb5adce5ce
Reformat and reorder Types.hs
2019-02-04 10:22:02 -05:00
Steve Chávez and GitHub
04ab0ea753
Fix #1223 , incorrect OpenAPI externalDocs url ( #1232 )
2019-01-25 12:04:36 -05:00
steve-chavez
6b2778749f
Add ability to quote column names on filters
2018-12-12 12:07:30 -05:00
steve-chavez
36f86827ee
Fix #1008 , Handle columns that contain spaces
2018-12-12 12:07:30 -05:00
Steve Chávez and GitHub
501edc718d
Add db-extra-search-path config ( #1218 )
...
For adding schemas to the search_path, solves issues related to extensions created in the public schema.
2018-12-08 11:39:31 -05:00
Russell Davies and Steve Chávez
473ac70789
Add support for parsing JSON Web Key Sets
2018-11-13 13:58:17 -05:00
steve-chavez
dadfe965b9
Do hlint 2.1 hints
2018-11-06 11:54:10 -05:00
steve-chavez
63ead89470
Fix #1181 , correct qualify of function argument type
2018-11-06 11:54:10 -05:00
Kyle Russell and Steve Chávez
2da6bd6d1c
Config: apply CorsResourcePolicy to PUT requests
...
PUT requests are part of the public upsert API, so if postgrest
runs at a different origin, these requests will fail because they
don't pass CORS.
2018-10-21 13:30:52 -05:00
steve-chavez
5bfb68b982
Fix #1180 , embedding on views with composite pks
...
Also add CHANGELOG entries for previous fixes.
2018-10-12 09:24:22 -05:00
steve-chavez
dc834572d6
Fix #1182 , fix subselect view embedding for pg10
2018-10-12 09:24:22 -05:00
Roger LAM and Steve Chávez
d94cf2ed72
tiny typo?
2018-10-11 09:00:27 -05:00
Ben Gamari and Steve Chávez
e0cc4d1571
Update hasql
...
Move to hasql 1.3.
2018-09-28 08:57:26 -05:00
mdr1384 and Steve Chávez
dfa9055c34
Close #1158 , Add summary to OpenAPI doc for RPC functions ( #1170 )
2018-08-27 10:22:21 -05:00
Steve Chávez and GitHub
30b5859b28
Fix #1141 , app.settings resetting on pool timeout ( #1169 )
...
* Add test for ensuring app.settings don't reset
2018-08-20 11:02:03 -05:00
Steve Chávez and GitHub
0a1d83ce8f
Fix JWTIssuedAtFuture for valid iat claim ( #1166 )
...
* Add test for ensuring "iat" works with time cache
2018-08-16 12:29:32 -05:00
steve-chavez
2066220244
Change server-host default of *4 to 127.0.0.1
2018-08-16 11:15:09 -05:00
mdr1384 and Steve Chávez
56bd5d5f91
Quote identifier names in RPC function arguments ( #1153 )
2018-07-30 09:11:09 -05:00
Alexey Alekhin and Steve Chávez
70e95649fd
OpenAPI: Change GET response type to array ( #1149 )
2018-07-24 12:26:45 -05:00
Alexey Alekhin and Steve Chávez
2b46afe1ec
OpenAPI: add required section for the non-nullable columns ( #1148 )
2018-07-23 11:11:45 -05:00
steve-chavez
69a76a627f
Close #1145 , OpenAPI materialized view columns
2018-07-18 09:43:42 -05:00
steve-chavez
ecf0e9213f
Remove array slice in allSynonyms query
...
This is for ensuring compatibility with pg 9.4 which doesn't support
omitting the array slice upper bound, [2:] gives an error.
The query still works fine because the array slice was to avoid having
a "({" result but this gets removed in the later join.
2018-07-18 09:43:42 -05:00
steve-chavez
1c6ded16d1
Add improved query for allSynonyms
...
This query works with views with subselects, and it's a lot faster,
on a complex schema the previous query was taking around 8 mins,
this query takes less than half a second(403.072 ms).
Also reorder view embedding tests
2018-07-18 09:43:42 -05:00
steve-chavez
d34afe861a
Allow finishing a json path with single arrow ->
...
Now a json can be obtained without resorting to casting
- Previously: `/json_arr?select=data->>2::json`
- Now: `/json_arr?select=data->2`
2018-06-19 11:17:59 -05:00