Robert Vollmert and Steve Chavez
dea57bd1be
Raise lower bound for configurator-pg.
...
Building on GHC 8.8.3 requires the MonadFail instance that 0.1.0.6
provides.
2020-03-09 13:06:27 -05:00
Robert Vollmert and Steve Chavez
3e81a38438
Relax upper bounds for GHC 8.8.3 / stackage lts-15.3.
...
Specifically, allow base 4.13 which ships with GHC 8.8, as well
as several dependency updates including hasql-transaction 1.0,
swagger 2.5 and warp 3.3.
2020-03-09 13:06:27 -05:00
Robert Vollmert and Steve Chavez
dfdf3d30b3
Fix test typo.
2020-03-07 13:04:17 -05:00
Robert Vollmert and Steve Chavez
60b64d3e81
Upgrade hspec-wai dependency to 0.10.
2020-03-07 13:04:17 -05:00
Robert Vollmert and Steve Chavez
962fba4d16
Update stack.yaml.lock for HSYaml extra-deps.
2020-03-07 13:04:17 -05:00
steve-chavez
de218e900b
Fix for sylish-haskell
2020-02-21 13:30:30 -05:00
steve-chavez
b75e7cef90
Change server-proxy-uri 2 openapi-server-proxy-uri
...
The server-proxy-uri config option mislead into thinking it was a
web server global setting when it's only related to OpenAPI.
2020-02-02 15:23:32 -05:00
steve-chavez
9b1224827a
Allow overriding headers Location,Content-Type,etc
2020-01-21 12:28:05 -05:00
steve-chavez
c7f78fa7fc
Add response.headers on GET/POST/PATCH/PUT/DELETE
2020-01-21 12:28:05 -05:00
steve-chavez
7dade7f466
Add request method and path GUCs
2020-01-21 12:28:05 -05:00
steve-chavez
b20e1150a5
Add GUC for accessing the Authorization header
2020-01-21 12:28:05 -05:00
steve-chavez
aa0d6a6831
Update BACKERS.md
2020-01-21 12:28:05 -05:00
Steve Chavez and GitHub
663faa1f82
Allow specifying the constraint name to disambiguate an embedding ( #1430 )
...
Makes previous duck typing regex unnecessary since the FK can be renamed
to a singular name or to any other format.
* Remove embedding with duck typed column names
* Allow embedding by foreign key name
* Add junction disambiguation tests
2020-01-06 09:42:33 -05:00
YUKISHITA Yohsuke and Steve Chavez
99b13fa25f
Upsert with "Prefer: resolution=merge-duplicates" on specified columns ( #1327 ) ( #1432 )
...
Allow query param 'on_conflict=key1,key2,...' to upsert with explicit columns with unique
constraint.
2019-12-29 11:52:58 -05:00
Dmitry Wagin and Steve Chavez
e12c1319b6
Change default server-unix-socket-mode 755 -> 660 ( #1423 )
2019-12-16 08:37:00 -05:00
Dmitry Wagin and Steve Chavez
7f365bf60b
Enforce singular behavior despite Prefer: return ( #1417 )
2019-12-08 01:49:20 -05:00
Dan Amoroso and Steve Chavez
2e6c78d723
add config option server-unix-socket-mode ( #1415 )
...
* added config option server-unix-socket-mode to enable custom socket permissions
* added server-unix-socket-mode input validation
2019-11-23 10:52:33 -05:00
steve-chavez
f9c64d9f65
refactor: improve disambiguation error message
...
* reverse backwards relationships
* remove redundancy from getJoinSelects
* properly name Cardinality constructors
2019-11-17 13:28:21 -05:00
steve-chavez
4ef6926791
Update authorship
2019-11-17 13:28:21 -05:00
Brian Wignall and Steve Chávez
9645f1011c
Fix double-and typo
2019-11-12 10:00:23 -05:00
steve-chavez
9847e60dca
Err embedding when multiple relationships found
...
When having one-to-many relationships like:
person -< message[sender]
person -< message[recipient]
person_detail -< message[sender]
person_detail -< message[recipient]
Where person_detail is a view of person.
This request:
GET "/message?select=*,sender(*)"
Is ambiguous. Both person or person_detail could be embedded.
Until now we have returned the first detected relationship but
now we return a 300 Multiple Choices error with a
descriptive error message asking the user to disambiguate.
This is more helpful for the user and also aids in cases of more
complex relationships.
2019-11-05 12:55:48 -05:00
steve-chavez
cb3d9ab625
refactor: rename RelationType to Cardinality
...
Remove Root type constructor
2019-11-05 12:55:48 -05:00
steve-chavez
db41fb454e
refactor: Rename synonyms to source columns
2019-11-05 12:55:48 -05:00
steve-chavez
3b133d5554
Fix #1397 , correct compression to XZ for osx bin
2019-10-24 13:12:39 -05:00
Steve Chávez and GitHub
80f763448f
Fix unique foreign key in view ( #1395 )
2019-10-16 12:45:38 -05:00
steve-chavez
a3701f5de8
Update BACKERS.md
2019-10-14 14:31:29 -05:00
steve-chavez
ed2bfc09a6
Allow PATCH/DELETE w/o Prefer when no SELECT privs
...
PATCH/DELETE can now be done without adding Prefer return=minimal when
the user doesn't have SELECT privileges.
* Also fix PATCH wrong HTTP status code
2019-10-08 12:41:39 -05:00
steve-chavez
337f821e00
refactor: remove parent embed workaround(in #647 )
...
This workaround is no more necessary since the addition of #978 .
* Also add a test for proving parent embeds offset is consistent
with other types of embeds.
2019-10-08 12:41:39 -05:00
steve-chavez
f2b126f147
refactor: Move hasql helpers to Common module
2019-10-08 12:41:39 -05:00
steve-chavez
1173bc277b
refactor: rm configSchema ref in postgrest func
...
* make TargetDefaultSpec take a schema attribute
* remove schema param from addJoinConditions
2019-10-08 12:41:39 -05:00
steve-chavez
50f2cc16ab
refactor: rm schema arg from QueryBuilder funcs
...
* Change TableName to QualifiedIdentifier in ReadQuery
and MutateQuery.
* Move removeSourceCTESchema to DbRequestBuilder.
2019-10-08 12:41:39 -05:00
steve-chavez
eebe319bfd
Recommend doing make check pre-commit
2019-09-30 08:46:31 -05:00
steve-chavez
75a42b77ea
Fix M2M resource embedding on RPC and mutations
2019-09-28 13:45:18 -05:00
steve-chavez
d71d3450af
Fix PATCH embed when not having the id in ?select
2019-09-28 13:45:18 -05:00
steve-chavez
f080159268
refactor: add the returningCols function
...
* separate fieldNames from getting fkCols
* Put binaryField inside readSqlParts
* Move scalar proc logic to binaryField
* Move logic for the "SELECT *" default to DbRequestBuilder
2019-09-28 13:45:18 -05:00
steve-chavez
0183d32c7f
refactor: Remove DbRequest type
...
This type only adds an extra constructor.
2019-09-28 13:45:18 -05:00
steve-chavez
94f5894d7f
Fix self join resource embedding on PATCH
2019-09-28 13:45:18 -05:00
steve-chavez
81e5a62f25
refactor: remove fromJust in DbRequestBuilder
...
* Also comment and reorganize DbRequestBuilder
2019-09-28 13:45:18 -05:00
Steve Chávez and GitHub
186381bab2
Add support for Prefer: count=planned/estimated on GET /table ( #1386 )
2019-09-18 10:13:48 -05:00
steve-chavez
e044488f73
Make costly bulk call query optional
...
Bulk Call should be used by specifying
the `Prefer: params=multiple-objects` header.
2019-09-11 12:01:41 -05:00
steve-chavez
b077974ebc
Add tests for call proc queries EXPLAIN costs
...
* circleci: add run query costs tests
2019-09-11 12:01:41 -05:00
steve-chavez
200540dfc3
refactor: put callProc core query to QueryBuilder
...
* Move set local queries to QueryBuilder
* Move unquoted to Middleware
2019-09-11 12:01:41 -05:00
steve-chavez
3c00f46e36
refactor: Move statements logic to own module
...
* Move gucHeader decoding to Statements
2019-09-11 12:01:41 -05:00
steve-chavez
620721dea7
Add support for HEAD request
2019-09-03 13:38:53 -05:00
steve-chavez
68cbe34c11
refactor: only run db reset on certain specs
...
This speeds up running the whole test suite
2019-09-03 13:38:53 -05:00
steve-chavez
e21b010c6e
refactor: reorganize modules
...
* Move range logic from App to RangeQuery
* Move decoder logic to Statement modules
* Move location headers logic to functions
* Add a comment for App.hs module
2019-09-03 13:38:53 -05:00
Robert Vollmert and Steve Chávez
0846d4d7b2
stack.yaml: Document use of obscure ghc options.
2019-08-27 14:49:07 -05:00
Robert Vollmert and Steve Chávez
2183a2a1ae
stack.yaml: Remove no-warn-redundant-constraints.
...
The warning appears to not be part of -Wall anymore in recent
GHC versions.
Also move the warning-related options next to each other.
2019-08-27 14:49:07 -05:00
Robert Vollmert and Steve Chávez
e8475b18d3
Update stack.yaml.lock for lts-14.3
2019-08-27 09:35:27 -05:00
Robert Vollmert and Steve Chávez
cdc1177762
stylish-haskell: check Haskell source files only
...
The style check was failing due to a changed stack.yaml.lock file.
(That file still should be updated, but this is not where it should
cause a failure.)
2019-08-27 09:35:27 -05:00