steve-chavez
7629eff51d
undefined-keys=apply-defaults to missing=default
2023-03-29 05:33:38 -05:00
steve-chavez
46fd856fc6
test: tidy inlining plan test
2023-03-29 05:33:38 -05:00
Steve Chavez and GitHub
439a96c578
feat: undefined json keys as defaults w/ Prefer:undefined-keys
2023-03-22 02:44:14 -05:00
steve-chavez
5b6421d03a
test: fix sporadic failure on PlanSpec
2023-02-28 17:30:54 -05:00
steve-chavez
0d5d209bfb
perf: use LATERAL instead of CTE for json body
...
* add pgbench test for INSERT and RPC
* use LATERAL for RPC and INSERT
* add tests for inlining
2023-02-25 15:01:06 -05:00
Laurence Isla and GitHub
60f4446fd8
Change inaccurate error codes to new ones
...
- Code for column is not found is PGRST204
- Code for timed out when acquiring connection to db is PGRST003
2023-02-09 14:57:51 -05:00
steve-chavez
be6c30a0fb
refactor: dry RPC param parsing
2023-01-18 12:26:13 -05:00
Alexander Ljungberg and GitHub
43ad6d6aa0
feat: validate ?columns mutation targets based on schema cache ( #2542 )
...
This returns an error for trying to update or insert into invalid columns, without hitting the database. This change also switches from `json_populate_recordset` for these operations `json_to_recordset` which should make no functional difference except allowing future flexibility.
2023-01-07 22:08:30 -05:00
Laurence Isla and GitHub
5a660e0cbe
Add suggestions with fuzzy text search when no relationship is found ( #2583 )
2022-12-15 18:33:15 -05:00
steve-chavez
566c6fe53f
correct bad null filter restriction
...
When embedding using the column name.
Also make related order similarly strict to avoid the same kind of issues.
2022-12-15 18:02:25 -05:00
steve-chavez
3773cce246
feat: null filters on embedded resources
2022-12-12 17:14:54 -05:00
steve-chavez
781fa592ca
refactor: delete QueryCost, instead use PlanSpec
2022-12-12 13:31:02 -05:00
steve-chavez
1065021348
refactor: add planCost and planHdr for tests
2022-12-12 13:31:02 -05:00
Laurence Isla and GitHub
aecc53d8f9
fix: clarify error messages for functions
...
Move explanation on single unnamed parameters to the error details
2022-12-09 14:34:38 -05:00
steve-chavez
a5465e20d0
correct spread embed to '...'
2022-12-05 19:38:32 -05:00
Laurence Isla and GitHub
9e567216e9
feat: hint function names/parameters on error
2022-12-01 17:17:45 -05:00
Steve Chavez and GitHub
5e9dba5292
feat: Allow embedding without selecting any column ( #2574 )
2022-11-25 18:37:57 -05:00
steve-chavez
f7009635d6
test: move failed order parsing to doctest
2022-11-24 09:03:35 -05:00
steve-chavez
e5c77385ae
test: move failed or/and parsing to doctest
2022-11-24 09:03:35 -05:00
steve-chavez
3103060f4b
test: move failed json parsing to doctest
2022-11-24 09:03:35 -05:00
steve-chavez
315b01ebf7
test: spread embed includes junction cols
2022-11-18 18:11:14 -05:00
steve-chavez
25f65065f4
test: spread embed disambiguates recursive m2m
2022-11-18 18:11:14 -05:00
steve-chavez
60c0c11c1d
test: spread embed disambiguates 2 fks on junction
2022-11-18 18:11:14 -05:00
steve-chavez
cb99270a8f
fix: bad M2M embed on RPC
2022-11-18 17:49:24 -05:00
steve-chavez
cca0b5ae66
messages: better error for related order
2022-11-16 21:26:16 -05:00
steve-chavez
2aa0e091bb
feat: add spread embeds
2022-11-16 21:26:16 -05:00
steve-chavez
78d45b4e32
feat: add related orders
2022-11-08 17:28:50 -05:00
Laurence Isla and GitHub
b8c5d212ea
fix: Fatal error when requesting limit=0 and db-max-rows is set ( #2560 )
2022-11-04 18:14:16 -05:00
Wolfgang Walther and Wolfgang Walther
44dd73adcc
fix: Embedding views with partial FK references broken
...
This is a regression introduced in d2719420f4 .
Fixes #2548
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-31 18:15:06 +01:00
Wolfgang Walther and Wolfgang Walther
2c31c64325
fix: Detect all relationships when multiple view columns reference the same table column
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-28 18:12:58 +02:00
Wolfgang Walther and Wolfgang Walther
e274706088
fix: Ignore leading and trailing spaces in column names, fts languages and casts
...
Fixes #2285
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
ecf54bef43
test: Add basic doctests for pFieldName
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
steve-chavez
45e7aac218
fix: embedding computed with normal relationship
2022-10-27 13:49:53 -05:00
Wolfgang Walther and Wolfgang Walther
f9f572a5d2
fix: Treat non-setof computed relationships as M2O/O2M
...
Fixes #2481
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 19:50:38 +02:00
Wolfgang Walther and Wolfgang Walther
3d2880d40a
fix: Return status code 200 when PATCHing without changing rows
...
This partially reverts #1257 / #1272 / 553531711b where the 404 was introduced.
A 406 error is still returned when requesting a single object via accept header.
Returning an error when no rows are changed can be introduced through a different syntax again, see the discussion in #2164 .
Fixes #2343
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 19:28:06 +02:00
Wolfgang Walther and Wolfgang Walther
6fe1617348
fix: Expose PKs from all tables in a view
...
Fixes a regression in d2719420f4 .
Resolves #2458
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-24 16:49:32 +02:00
Wolfgang Walther and Wolfgang Walther
2158f3d039
fix: Embed views with different column ordering correctly
...
This fixes a regression introduced in d2719420f4 .
The order of relColumns in the schema cache is now consistently matching the order of columns in foreign key definitions.
Resolves #2518
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-24 16:49:32 +02:00
steve-chavez
7ace8ace49
fix: aliasing on computed rels
2022-10-19 19:49:43 -05:00
Laurence Isla and GitHub
d5e662567b
fix: add error body when Prefer: count=exact is used and offset is out of bounds
...
* Adds error body when Prefer: count=exact is used and offset is out of bounds
* Adds details to differentiate between negative limits, lower boundaries greater than upper boundaries and out of bound ranges
2022-09-15 18:39:37 -05:00
Laurence Isla and GitHub
334f500f7c
fix: make computed relationships work when the schema name has special characters
2022-09-15 11:07:57 -05:00
steve-chavez
c45e85c5a6
feat: add one to one relationship for embedding
...
BREAKING CHANGE: For the cases where one to one relationships are
detected, json objects will be returned instead of json arrays of length
1.
If you wish to override this behavior, you can use computed
relationships to return arrays again.
2022-08-18 22:36:47 -05:00
steve-chavez
d6ec171bcb
feat: add computed relationships
...
* work for select, mutations, rpc
* overrides detected relationships
2022-08-17 22:50:06 -05:00
Laurence Isla and GitHub
b2b92e75cc
Make text the default format for the execution plan
2022-08-17 17:58:02 -05:00
Laurence Isla and GitHub
ba3ba9fd5b
refactor: simplify tests where mutations need to be verified in the db
2022-08-15 12:06:54 -05:00
Laurence Isla and GitHub
7de8d5446a
Revert bulk update patch
...
- Revert patch #2311
- Keep the refactor done to qsFiltersRoot
- Keep the refactor done to the items tables
- Add tests that now work with pg-safeupdate as a result
2022-08-12 10:00:33 -05:00
Laurence Isla and GitHub
4ac47df528
tests: Add tests for the pg-safeupdate library
2022-08-10 11:50:57 -05:00
steve-chavez
3648986aa8
refactor: correlated subquery for o2m query
...
Improves the query costs a bit as shown in the tests and reduces code.
2022-08-06 21:42:53 -05:00
steve-chavez
c050b61db8
tests: add basic resource embedding costs
...
Adds costs thresholds on the PlanSpec for the o2m,m2o and m2m queries.
2022-08-06 21:42:53 -05:00
steve-chavez
fd7c23f7a1
Add "for" param for the vnd.pgrst.plan media type
2022-08-01 17:41:23 -05:00
steve-chavez
84e03a16dd
fix: columns w/ dollar sign($) don't need quoting
2022-07-30 19:50:09 -05:00