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
steve-chavez
30dfadec7b
Add support for getting json by array index
...
* Also support json negative array index
2018-06-19 11:17:59 -05:00
steve-chavez
2513c00039
Refactor Field type,move tests to JsonOperatorSpec
2018-06-19 11:17:59 -05:00
steve-chavez
37e7398a85
Fix UPSERT bug on camelCase PK column
2018-05-31 11:57:42 -05:00
Felix Yan and Steve Chávez
9ea7529f30
Use protolude 0.2.2, replace undefined with witness
...
protolude provides headMay since 0.2.2, it can be used instead of safe.
2018-05-28 13:08:27 -05:00
steve-chavez
ca76a8e6be
Update links, add patreon badge
2018-05-14 18:44:52 -05:00
steve-chavez
28845e0f43
Fix accepting misspellings in order syntax
2018-05-14 07:34:15 -05:00
steve-chavez
30cf1d100a
Add foreign tables to OpenAPI output
2018-05-07 10:14:26 -05:00
steve-chavez
e9aaf05335
Remove support for non url safe operators
2018-05-02 13:06:44 -05:00
steve-chavez
79a7ce49f2
Remove support for {} embed and "in" op w/o parens
2018-05-02 13:06:44 -05:00
steve-chavez
f033c2c4b5
Add role-claim-key config value
2018-04-30 11:31:06 -05:00
steve-chavez
5c87fe2704
Add getCurrentTime cache for jwt validation
2018-04-30 11:31:06 -05:00
steve-chavez
32c7e32bdf
Allow embeds alias to be used in filters, fix #821
2018-04-02 11:09:45 -05:00
steve-chavez
062a5581f5
Allow specifying source column in embed, fix #1078
2018-04-02 11:09:45 -05:00
steve-chavez
50512e1117
Refactor addRelations and findRelation functions
...
Just reordering and renaming variables to reduce indentation, logic remains the same.
2018-04-02 11:09:45 -05:00
steve-chavez
edae60f8c1
Only alias tables on self join cases
2018-04-02 11:09:45 -05:00
steve-chavez
243e692192
Refactor some functions to use concatMap
2018-03-17 07:53:41 -05:00
steve-chavez
349a5ae076
Fix Parent Relation when having many views( #1044 )
2018-03-17 07:53:41 -05:00
steve-chavez
ff709a65e5
Add FROM targets aliasing to avoid conflict in embeds
2018-02-21 09:23:08 -05:00
steve-chavez
8e2a0e05ea
Refactor QueryBuilder and DbRequestBuilder
...
- Refactor ORDER BY and LIMIT query fragments
- Move ReadRequest building to DbRequestBuilder
- Clarify Relation link table attributes
- Change Join Operation to JoinCond
2018-02-21 09:23:08 -05:00
steve-chavez
108f3cd651
Add Preference-Applied header for POST upsert
...
- Ensure creating nothing on ignore-duplicates succeeds
- Refactor locationF query
2018-02-21 07:33:54 -05:00
steve-chavez
6675821c64
Allow PUT method: UPSERT of a single row
2018-02-21 07:33:54 -05:00
steve-chavez
85b1dc0eb4
Add UPSERT for POST with Prefer:resoultion=merge/ignore-duplicates
2018-02-21 07:33:54 -05:00
Duane Johnson and Joe Nelson
a46b6f5020
Pass custom settings to the DB's SESSION ( #1063 )
...
- allows queries to refer to current_setting('app.settings.foo') to retrieve variables
- useful for 12-factor apps (app data can be in environment)
- provides workaround for AWS Relational Database Service (RDS) not
allowing `ALTER DATABASE SET 'app.[KEY]' TO '[VALUE]'` on database.
2018-02-19 12:41:22 -06:00
steve-chavez
70ce1b9329
Reduce memory usage of uniform json array restriction
2018-01-27 13:55:20 -05:00
steve-chavez
f7e7834a1c
Handle overloaded function case
...
* Add test for params=single-object on GET
* Add tests for procs with DEFAULT args
* Add tests for overloaded functions
* Add test for PATCHing with an empty json array, this previously
gave a "Something is wrong" error
2018-01-10 11:43:16 -05:00
steve-chavez
38f3bcf4a6
Reduce memory usage by avoiding Aeson encode
...
It was detected that Aeson encoding had high memory usage when
the json payload was large, around x60 the payload size.
With this change we get around x10 payload size memory usage.
The encodeUtf8(when doing a Text -> ByteString with `toS`) function
on a large payload also contributed to the high memory usage.
Main idea to reduce the memory usage was to let the ByteString coming
from the request body go to the database unchanged.
2018-01-10 11:43:16 -05:00
steve-chavez
f159233de8
Change UPDATE query to a parametrized query
2018-01-10 11:43:16 -05:00
steve-chavez
02a286a4b1
Change callProc query to a parametrized query
2018-01-10 11:43:16 -05:00