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
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.
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
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.
* separate fieldNames from getting fkCols
* Put binaryField inside readSqlParts
* Move scalar proc logic to binaryField
* Move logic for the "SELECT *" default to DbRequestBuilder
* 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
Two changes:
- tags are now an insert-ordered hashset
- type_ .~ -> type_ ?~ with some magic type inference
This also updates stack.yaml to the newest GHC 8.6 LTS release.
* Lengthen child_entities name comment to make tests check it does not get truncated at 63 chars.
* Don't cast column description to sql_identifier type (maxlen 63 chars) when introspecting schema in DbStructure.hs
* Update resolver to lts-13.29 and add lock file to repository
* Upgrade stack version
* Save cache after building dependencies only to have faster feedback loop when tests fail
* Move private functions from QueryBuilder to a separate Private module
* Move more functions over to private trying to make compilation consume less memory
* Split private in 4 modules
* Remove unused LambdaCase pragma
* Add profile to memory-tests.sh so it can find postgrest executable
* Move save dependencies before building and running tests for faster feedback loop
* Update config default; Copy non-defaults
* Update .stylish-haskell config version to match pgrst
* Apply stylish haskell to all files
* CircleCI config
* Remove redundant import.
What is used from Network.HTTP.Types.Headers is also exported by Network.HTTP.Types.
* Grouped imports
* Show un-styled files on CircleCI failure
* Fix styling imports
* Apply adhoc standard correctly