Wolfgang Walther and Wolfgang Walther
772d3c4e01
chore: Update cachix actions
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 21:54:30 +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
88b5966a44
nix: Remove deprecation warning for dockerTools.buildImage { contents }
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 19:29:26 +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
958e052de5
chore: Clean up CHANGELOG
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 17:39:04 +02:00
Wolfgang Walther and Wolfgang Walther
793acd276a
test: Non-existing config options should not break anything
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-27 17:39:04 +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
Wolfgang Walther and Wolfgang Walther
ca338ae401
test: Remove unused no_pk_view from fixtures
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-24 16:49:32 +02:00
Wolfgang Walther and Wolfgang Walther
5135fea797
test: grant privileges on all test tables by default
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-10-24 16:49:32 +02:00
dependabot[bot] and Steve Chavez
df538bfd98
build(deps): bump LouisBrunner/checks-action from 1.3.1 to 1.5.0
...
Bumps [LouisBrunner/checks-action](https://github.com/LouisBrunner/checks-action ) from 1.3.1 to 1.5.0.
- [Release notes](https://github.com/LouisBrunner/checks-action/releases )
- [Commits](https://github.com/LouisBrunner/checks-action/compare/v1.3.1...v1.5.0 )
---
updated-dependencies:
- dependency-name: LouisBrunner/checks-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-10-24 09:37:56 -05:00
steve-chavez
7ace8ace49
fix: aliasing on computed rels
2022-10-19 19:49:43 -05:00
steve-chavez
c8b39c6cde
refactor: aliasing logic to addRels
...
* also shorten query builder alias logic
2022-10-19 19:49:43 -05:00
steve-chavez
5f5a0c7764
refactor: simplify join conditions logic
2022-10-19 19:49:43 -05:00
steve-chavez
922da4520f
refactor: clarify ReadPlan fields
2022-10-19 19:49:43 -05:00
Felix Yan and Steve Chavez
64e047e5d7
Allow aeson 2.1
...
Builds fine and all tests pass.
2022-10-14 13:44:39 -05:00
steve-chavez
efecf007e8
bump version to 10.0.0.20221011
2022-10-11 11:42:40 -05:00
Felix Yan and Steve Chavez
b81e15d0c5
Allow vector 0.13
...
Builds fine and all tests pass.
2022-10-10 17:47:48 -05:00
Steve Chavez and GitHub
0fbb116dd2
add basic ARCHITECTURE.md ( #2503 )
...
* refactor: move ApiRequest a top-level module
* refactor: rename DbStructure to SchemaCache
* refactor: GucHeader inside Response
* refactor: admin app to Workers
2022-10-10 11:24:45 -05:00
steve-chavez
e4b98d51be
fix: resource embedding opens empty transaction
...
This required untangling logic from App.hs.
Building/rejecting a plan no longer consumes a pool connection.
* Added io test for failed resource embedding not consuming connection
* optionalrollback to Query.hs and Response.hs
* delete Middleware module
* remove plan logic from App.hs
* remove RequestContext
* remove pkCols logic from App.hs
* remove proc logic from App.hs
* remove config logic from handleRequest
2022-10-07 18:52:57 -05:00
steve-chavez
d37e14c4db
refactor: readTotal into ResultSet
2022-10-07 18:52:57 -05:00
Felix Yan and Steve Chavez
cfaeff8a5a
Allow jose 0.10
...
Builds fine and all tests pass.
2022-10-05 18:22:32 -05:00
steve-chavez
6398dd2b32
refactor: add plan module
...
* rename/add plan dirs
* add read plan func/data
* add call plan func/data
* add mutate plan func/data
2022-10-04 16:13:34 -05:00
steve-chavez
11385bbd9f
refactor: move binaryField to ApiRequest
2022-10-01 11:05:49 -05:00
steve-chavez
858e4405ec
refactor: getSchema in ApiRequest
2022-10-01 11:05:49 -05:00
steve-chavez
46307ca64a
refactor: getMediaType in ApiRequest
2022-10-01 11:05:49 -05:00
steve-chavez
fd67c8480c
refactor: OpenAPI as Response submodule
...
* body after dbstructure
* rename runPgLocals to setPgLocals
2022-10-01 11:05:49 -05:00
steve-chavez
f54dc2e20e
refactor: runPgLocals to Query.hs
...
* unmmiddleware runPgLocals
2022-09-26 17:28:08 -05:00
steve-chavez
e356783cc9
refactor: add Query.hs module
...
* add readQuery
* add createQuery
* update query
* single upsert query
* delete query
* invoke query
* open api query
2022-09-26 17:28:08 -05:00
steve-chavez
b5080fa2d7
refactor: untangle query logic from request logic
2022-09-26 17:28:08 -05:00
dependabot[bot] and Steve Chavez
e564ed6e3e
build(deps): bump codecov/codecov-action from 3.1.0 to 3.1.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.0...v3.1.1 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-26 12:12:12 -05:00
steve-chavez
8d369a2195
refactor: add Response.hs module
...
* add response updateResponse
* add singleUpsertResponse
* add delete/invoke response
* add open api response
* add info response
* remove ApiRequest from profileHeader
* contentTypeHeaders only needs ApiRequest
2022-09-25 13:53:11 -05:00
steve-chavez
92e28bd902
refactor: untangle query logic from response logic
...
* untangle failNotSingular
* untangle failsChangesOffLimits
* untangle readTotal
2022-09-25 13:53:11 -05:00
steve-chavez
c27e7be028
refactor: move guc headers/status decoding to App
2022-09-25 13:53:11 -05:00
Wolfgang Walther and Steve Chavez
9d3bbc736b
nix: Add hint how to derive docker image
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-09-20 16:39:37 -05:00
Robert Vollmert
38ecaa44db
encode json body in binary, using modified hasql dep
...
- switch from "unknown" parameter in text format to a "json" parameter in
binary format (no dependency update required)
- use a lazy bytestring "json" encoder (via updated hasql)
2022-09-19 20:49:11 +02:00
Robert Vollmert
efd65ff1f4
nix: add update-nix-fetchgit to shell
2022-09-19 20:49:11 +02: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
dependabot[bot] and Steve Chavez
bb52fb9b0e
build(deps): bump LouisBrunner/checks-action from 1.2.0 to 1.3.1
...
Bumps [LouisBrunner/checks-action](https://github.com/LouisBrunner/checks-action ) from 1.2.0 to 1.3.1.
- [Release notes](https://github.com/LouisBrunner/checks-action/releases )
- [Commits](https://github.com/LouisBrunner/checks-action/compare/v1.2.0...v1.3.1 )
---
updated-dependencies:
- dependency-name: LouisBrunner/checks-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-07 11:02:48 -05:00
Robert Vollmert
74ee6cd674
fix naming of stack builds (they don't test)
2022-09-05 23:27:41 +02:00
Robert Vollmert
524c6a7c2c
postgresql-libpq: use PostgREST fork with reduced copies
...
This pulls in the change from https://github.com/PostgREST/postgresql-libpq/pull/1 .
2022-09-05 23:27:41 +02:00
Robert Vollmert
c9f7504d09
ci: edit stack.yaml.lock trivially to invalidate macOS cache
2022-09-05 17:57:50 +02:00
Robert Vollmert
ba1fcfd1e3
feat: introduce pool acquisition timeout ( fixes #2348 )
...
The configuration option db-pool-acquisition-timeout
specifies the time in seconds to wait for the pool to
free up a connection slot. Otherwise, a 504 error is
returned. By default, there is no timeout.
2022-08-31 19:54:34 +02:00
Robert Vollmert
554db21f49
tests: fix 'no_pool_connections_available' ( fixes #2456 )
2022-08-31 19:13:53 +02:00
Robert Vollmert
ebc34561fa
tests: show that 'no_pool_connections_available' is broken
2022-08-31 19:13:53 +02:00