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
steve-chavez
bdfb11001e
Fix #1264 , allow bulk RPC call
2019-04-05 19:10:00 -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
86e460c5c4
Add implicitJoins to ReadQuery type
2019-02-04 10:22:02 -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
steve-chavez
dadfe965b9
Do hlint 2.1 hints
2018-11-06 11:54:10 -05:00
steve-chavez
dc834572d6
Fix #1182 , fix subselect view embedding for pg10
2018-10-12 09:24:22 -05:00
Ben Gamari and Steve Chávez
e0cc4d1571
Update hasql
...
Move to hasql 1.3.
2018-09-28 08:57:26 -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
mdr1384 and Steve Chávez
56bd5d5f91
Quote identifier names in RPC function arguments ( #1153 )
2018-07-30 09:11:09 -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
edae60f8c1
Only alias tables on self join cases
2018-04-02 11:09:45 -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
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
Ruslan Talpa and GitHub
effbec234f
Faster queries using json_agg
2017-12-12 15:44:50 +02:00
steve-chavez
fef7d949d9
Fix #411 , remove the need for pk in &select for parent embed
2017-11-30 12:56:18 -05:00
steve-chavez
be630aa680
Change phrase/plain full text search syntax
2017-11-27 11:38:54 -05:00
steve-chavez
188f947437
Maintain backward compatibility on GUC headers feature
...
If pg version >= 9.6 is detected the feature is enabled,
also all of the 9.6 dependent tests are moved to their own spec.
2017-10-18 17:41:55 -05:00
steve-chavez
b9a591aecb
Add ability to map GUC to http response headers
2017-10-18 17:41:55 -05:00
steve-chavez
d1a8c3a6f8
Fix #974 RPC error when function has single OUT param
2017-10-09 10:45:17 -05:00
steve-chavez
e1cab584a3
Add test for #996 embed bug when table name = column name
2017-10-09 10:45:17 -05:00
grotsev and Joe Nelson
8f49f731d0
Fix embedded column conflicts table name ( #996 )
2017-10-05 21:03:27 -05:00
Steve Chávez and Joe Nelson
cf19ad0369
Allow GET on RPC ( #946 )
2017-09-17 11:16:46 -05:00
steve-chavez
6c2f179b48
Remove isnot and notin operators and refactor
2017-09-08 19:56:00 -05:00
steve-chavez
dff4d766a8
Allow dictionary and plain/phrase in fts
2017-09-08 19:56:00 -05:00
Russell Davies and Joe Nelson
59a320fd44
Add support for range operators ( #938 )
2017-08-20 09:45:27 -05:00
Felix Yan and Joe Nelson
69070b64f9
Fix compatibility with protolude-0.2 ( #939 )
...
This allows the Arch Linux PostgREST package to build cleanly
2017-08-14 01:36:33 -05:00
Joe Nelson and GitHub
d89937a6f3
Upgrade to fast new hasql ( #836 )
2017-08-10 01:54:15 -05:00
Ruslan Talpa and GitHub
b03e3fbec7
Ability to embed using a specific relation when there are multiple between tables, fixes #907 ( #918 )
...
* Ability to embed using a specific relation when there are multiple between tables, fixes #907
* fix lint errors
* fix code comments
* add type comments
2017-07-25 19:01:35 +03:00
Steve Chávez and Joe Nelson
968bf9ce59
Put traditional Filters inside [LogicTree] ( #911 )
2017-07-19 18:01:37 -05:00
steve-chavez
f0bd507ab9
Add binary output to rpc, Fix #883
2017-06-24 22:45:53 -05:00
steve-chavez
ecd58e1ad2
Refactor rpc to not use count when returning scalar
2017-06-24 21:07:07 -05:00
Steve Chávez and Joe Nelson
b007428142
Allow more than two conditions in a single and/or, Fix #889 ( #892 )
2017-06-21 00:52:21 -05:00
Joe Nelson and GitHub
50de0536de
Allow csv formatting in rpc output ( #882 )
2017-05-27 00:07:23 -05:00