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
Laurence Isla and GitHub
c893ac15dc
Add the missing 'get' path item for RPCs to the OpenAPI output
2023-02-09 12:04:41 -05:00
steve-chavez
7aadaa44e8
refactor: remove Target from infoResponse
2023-01-30 00:23:24 -05:00
steve-chavez
0139cd8261
refactor: move txMode to Plan
2023-01-30 00:23:24 -05:00
steve-chavez
7874bee879
fix: NOTIFY pgrst not reoading the catalog cache
2023-01-28 10:30:29 -05:00
AnthonyFisi and GitHub
9065ed65fa
feat: customizable OpenAPI title
2023-01-21 19:34:55 -05:00
Tuan Le and Steve Chavez
8aa79086d2
fix: consider authentication failure as a fatal error
2023-01-20 13:51:28 -05:00
Laurence Isla and GitHub
775c006806
fix: FK pointing to VIEW instead of TABLE in OpenAPI output
2023-01-20 09:37:15 -05:00
steve-chavez
be6c30a0fb
refactor: dry RPC param parsing
2023-01-18 12:26:13 -05:00
Robert and GitHub
8f80cd1469
Update nixpkgs, dependencies ( #2612 )
...
* relax upper bounds on HTTP, hspec, lens-aeson, optparse-applicative (fixes #2580 )
* upgrade stackage snapshot to latest LTS, with GHC 9.2.5
* bump nixpkgs to 2023-01-12
* fix complaints due to updated linters
2023-01-16 17:12:54 +01: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
4ddd5b4a76
Add upsert headers for POST requests to the OpenAPI output
2022-12-27 16:16:41 -05:00
Laurence Isla and GitHub
1f69757835
fix: Add required OpenAPI items object when the paramater is an array
2022-12-20 12:30:28 -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
52c011f896
refactor: remove Bool from readPlanToQuery
2022-12-12 17:14:54 -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
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
steve-chavez
ef42d1c87f
test: add doctest for pOrderTerm
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
425ab70ec7
fix: Make UPSERT work with PostgreSQL 15
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-28 16:18:42 +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
da632ac7d3
refactor: pIdentifierChar -> pIdentifier
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
b78b096ae4
fix: Stricter query string parsing - no empty fts lang
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
bbbc308b6f
fix: Stricter query string parsing - no empty casts
...
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
Wolfgang Walther and Wolfgang Walther
8c0d187044
fix: Stricter query string parsing - no hints or join types in regular fields
...
Fixes #2362
Reference #2475
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
ae8625a7b6
fix: Stricter query string parsing - no jsonpath in embedding
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
7c7a04a27e
test: Add doctests for pFieldForest
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:44 +02:00
Wolfgang Walther and Wolfgang Walther
2289defe4b
refactor: Use stronger typing for SelectItem parser
...
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
steve-chavez
5d126bf0a3
refactor: all aliasing in addRels
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
9be6747b66
fix: Prevent infinite recursion with self-referencing views
...
Fixes #2283
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-26 21:33:30 +02:00
Wolfgang Walther
3bee6b1e27
fix: Fix regression in openapi output with mode follow-privileges
...
This was introduced in d5b92a433a . Before
this change, the OpenApi output would have <pk/> annotations for views,
too. After this change, they got lost for mode follow-privileges, because
the pks are refined in haskell code, but the request only fetches all
the tables again, but not the view dependencies.
This fix changes follow-privileges to only fetch a list of accessible
tables, which is then used to filter the tables in the schema cache.
Fixes #2356
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-26 21:29:58 +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