SteveBash and Joe Nelson
8593600cfa
Transition IN operator and select query param to new block delimiters
2017-05-13 16:49:25 -05:00
SteveBash and Joe Nelson
b8eb2cd9c1
Add and/or params for complex boolean logic
...
* Add support for and/or params in GET, POST, PATCH and DELETE
* Restrict usage of IN in and/or to be inside parens e.g. in.(1,2,3)
* Allow quoting operators for values that have ',)' chars
inside and/or e.g. eq."(entity,1)"
2017-05-13 16:49:25 -05:00
SteveBash and Joe Nelson
59abecaf5b
Add missing tests for NOT IN accepting empty values and refactor
...
Go back to operators map since the previously defined
Operator constructors added innecesary complexity also
rename Path to EmbedPath
2017-05-13 16:49:25 -05:00
Steve Chávez and Joe Nelson
3e26c1a83f
Add connection retrying on startup and SIGHUP, Fix #742 ( #869 )
...
* Add connection retrying on startup and SIGHUP, Fix #742
* Ensure that only one connection worker can run at a time
* Change ConnectionError status code to 503 and add automatic connection retrying
2017-05-06 19:11:18 -05:00
Joe Nelson
d99462be01
Revert "Fix swagger-ui when "server-proxy-uri" is not set ( #857 )"
...
This was a bug in swagger-ui, not postgrest
2017-04-29 21:02:14 -05:00
Steve Chávez and Joe Nelson
0a9d9cdded
Fix #701 : allow quoted values for IN operator, refactor and Fix #641 : allow IN filter to have no values ( #854 )
2017-04-11 00:57:44 -05:00
Ruslan Talpa and Joe Nelson
5fffbbe381
Make HTTP headers available as GUCs #800 ( #849 )
2017-04-10 19:23:48 -05:00
Marios Koulakis and Joe Nelson
8557ee55f5
Update with empty json ( #852 )
2017-04-07 22:21:50 -05:00
Joe Nelson and GitHub
56bdf59e14
Read only proc tx ( #844 )
2017-04-07 12:52:16 -05:00
Feynman Liang and Joe Nelson
77af16c9e4
Fix swagger-ui when "server-proxy-uri" is not set ( #857 )
2017-04-07 08:51:29 -05:00
Feynman Liang and Joe Nelson
0cf49bb8b6
Adds application/json to inspect type ( #853 )
2017-04-06 10:43:56 -05:00
Marios Koulakis and Joe Nelson
9b4b45671c
Accept empty string as empty json body when calling an rpc ( #832 )
2017-03-27 21:34:03 -07:00
Steve Chávez and Joe Nelson
47b023e858
Fix proc resource embedding issue with search_path and refactor return type ( #831 )
2017-03-20 23:50:42 -07:00
Diogo Biazus and Joe Nelson
206ab163b6
Refactor error type and fix nested error message [ fix #791 ] ( #829 )
2017-03-12 22:02:13 -07:00
Diogo Biazus and Joe Nelson
728e40c96c
Update hspec-wai to 0.8.0 ( #799 )
2017-02-14 21:18:01 -08:00
Steve Chávez and Joe Nelson
98438c437f
Proposal for binary output ( #802 )
2017-02-14 20:36:51 -08:00
Joe Nelson and GitHub
84f68c68cb
Public schema table embedding ( #803 )
...
* Alter fixture to test objects in public schema
Properly erase and restore the public schema -- requires permissions to install pgcrypto each time.
* Test for fks through public schema tables
* Thanks @fab1an
2017-02-12 16:32:15 -08:00
Pi3r and Joe Nelson
1d8318ce26
Increase lower and upper bound for optparse-applicative ( #794 )
2017-02-03 10:00:13 -08:00
Joe Nelson
a61c783e2d
Add link to config docs in message
2017-01-22 16:18:41 -08:00
Steve Chávez and Joe Nelson
c15f693dbb
Move DbRequest building functions to new module ( #787 )
2017-01-17 21:59:59 -08:00
Steve Chávez and Joe Nelson
7e2cb5fe1c
Fix alias in select for mutate queries and small refactor ( #779 )
2017-01-16 23:20:02 -08:00
Joe Nelson and GitHub
104a7ed4fa
Use a mime type to request singular JSON responses ( #763 )
2017-01-16 15:11:37 -08:00
Ruslan Talpa and Joe Nelson
16fd3a57ff
Fix #746 ( #769 )
...
also fix broken text env
After the last couple of commits the tests ran correctly only on a
fresh db, in addition, the roles within the db were not created/dropped
on each request and we need that since their privileges differ and we
need to to have an absolute clean db on each execution
2016-12-18 15:46:53 -08:00
Trevor Basinger and Joe Nelson
e364cbc3ff
Support binary (b64) JWT secrets ( #772 )
2016-12-11 09:01:03 -08:00
Diogo Biazus and Joe Nelson
649a841ef4
Fix embeded relations error message ( #767 )
2016-12-10 11:59:17 -08:00
Ruslan Talpa and Joe Nelson
15c95399f8
Prevent database memory cosumption by prepared statements caches ( #768 )
2016-12-09 09:46:28 -08:00
Diogo Biazus
6c275fcec2
Coalesce types UniformObjects and Payload into the new PayloadJSON
2016-11-27 23:55:26 -05:00
Diogo Biazus
16ac034aab
Tidy up postgrest function body
2016-11-27 23:55:19 -05:00
Diogo Biazus
b158b4924e
Use rightToMaybe instead of case
2016-11-27 23:55:14 -05:00
Diogo Biazus
98ada3f9ee
Change nesting of if clause making code more symetrical
2016-11-27 23:55:07 -05:00
Diogo Biazus
090a62a2c8
Removes error case from Payload type. Now we don't build a payload when the parsing fails.
2016-11-27 23:55:02 -05:00
Diogo Biazus
654ac6e62e
Move function to conver ApiRequestError to a Http Response to the Error module.
2016-11-27 23:54:58 -05:00
Diogo Biazus
fec769c80e
Move range validation to userApiRequest.
2016-11-27 23:54:52 -05:00
Diogo Biazus
6a02d9efd5
Remove PayloadParseError matcher from main app case since now we validate the request before building an ApiRequest.
2016-11-27 23:54:48 -05:00
Diogo Biazus
b8ddc30252
Remove ActionInappropriate constructor from type Action since now we validate the request before building an ApiRequest.
2016-11-27 23:54:37 -05:00
Diogo Biazus
47c4fbc8ef
Introduce the type ApiRequestError and make userApiRequest return an Either ApiRequestError ApiRequest
2016-11-27 23:54:23 -05:00
dsimunic and Joe Nelson
ae40641963
Introduce new 'Prefer' header, params=single-object ( #739 )
2016-11-20 14:14:39 -08:00
Joe Nelson and GitHub
4df853eff9
Take config path as first param, not flag
...
Include example config in usage message
2016-11-17 22:45:59 -08:00
Diogo Biazus and Joe Nelson
41c1cf6e01
Reduce app function ( #733 )
...
Simplify the big app function
2016-11-10 20:42:00 -08:00
SteveBash
4064a7b984
Fix fatal error on postgres unsupported version, also fix #577 format of supported version
2016-10-29 13:38:19 -05:00
Joe Nelson
9dddd144a4
count(*) is faster than count(1)
2016-10-23 20:44:42 -07:00
Joe Nelson and GitHub
9233d90075
Read settings from config file ( #714 )
2016-10-20 08:34:57 -07:00
Joe Nelson and GitHub
74e68408e6
Bring packages up to date ( #722 )
...
* Bring packages up to date
* New LTS includes deps now
Use stack to select most versions
* Alphabetize packages
* Strip down packages
Switch tests to protolude
* Appease cabal check with base version constraint
2016-10-19 22:25:58 -07:00
Joe Nelson
c6cd8145eb
Set request.jwt.claim.*
2016-10-17 22:32:36 -07:00
Joe Nelson
5d904dfd66
Merge PR #713
...
Resolve petty CHANGELOG conflict
2016-10-12 20:52:40 -07:00
SteveBash
191601f129
Add ability to order by jsonb keys, fix #644
2016-10-05 14:46:12 -05:00
Ruslan Talpa
211e3d4141
fix relation detection bug and allow offset on lower levels
2016-10-05 11:34:07 +03:00
SteveBash
50ae48295d
Allow using nulls order without explicit order direction, fix #552
2016-10-04 16:11:19 -05:00
Joe Nelson
9cd65a4033
Avoid calling getPOSIXTime more than necessary
2016-10-03 09:55:28 -07:00
Joe Nelson
5a166e8e80
Fix custom pre-request handler
...
Uses Ruslan's technique
2016-09-27 23:17:08 -07:00