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
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
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
dsimunic and Joe Nelson
ae40641963
Introduce new 'Prefer' header, params=single-object ( #739 )
2016-11-20 14:14:39 -08:00
Joe Nelson
9dddd144a4
count(*) is faster than count(1)
2016-10-23 20:44:42 -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
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 and GitHub
f3b79bcc40
Use table alias unlikely to conflict with a column name ( #705 )
2016-09-08 08:16:47 -07:00
Diogo Biazus and Joe Nelson
6f737056a2
Protolude completion in library and executable ( #697 )
2016-08-21 15:10:19 -07:00
Ruslan Talpa
1372de6f43
query simplification by @diogob
2016-06-28 12:18:12 +03:00
Ruslan Talpa
2f166088c8
response shaping and filtering for rpc proc calls
2016-06-28 12:09:58 +03:00
Ruslan Talpa and Joe Nelson
b916ed907b
fix #637 ( #647 )
2016-06-17 10:45:25 -07:00
Joe Nelson
7563b5e2f4
Move unwords higher for branch parity
2016-06-02 08:40:24 -07:00
Joe Nelson
5e3d9442af
Use table defaults for empty object insert
...
Fixes #616
2016-06-02 08:40:24 -07:00
Ruslan Talpa
dc727f900d
suggested cleaup by @begriffs
2016-05-31 14:55:31 +03:00
Ruslan Talpa
7c83edc402
Limit embeded items
2016-05-26 09:56:28 +03:00
Christopher League
0940b2dccf
Simplify serialization of location header
...
Possible after bug fix in a Hasql that we picked up with the new
dependency bounds in #606 . Also includes test to ensure location header
is omitted on bulk insert.
2016-05-22 21:54:26 -04:00
Christopher League
5c38b4328b
URL-encode Location header ( closes #588 )
...
The database returns an array of key-value strings like `"k1=eq.hello
world"`. Haskell URL-encodes the portion after the equal sign and joins
them with `&`.
Includes updates to tests in Feature.InsertSpec: The CompoundPK has been
modified to have one Int and one String. We attempt to add a key with a
String that has spaces and other special characters. This requires that
the returned Location header is properly URL-encoded.
2016-05-20 10:42:55 -04:00
Ruslan Talpa
9e6542680b
Fix include entities from the same parent table using two different foreign keys
2016-05-16 15:36:18 +03:00
Ruslan Talpa
c13f0a369b
Support node/column renaming #310
2016-05-12 10:22:19 +03:00
Joe Nelson
3bfe64dd06
Create monomorphic statement function to force use of Text
2016-03-16 21:04:18 -07:00
Joe Nelson
330cc91645
Protect unicode values in requests
2016-03-13 14:20:54 -07:00
Joe Nelson
4cc08a11e7
Prevent duplicate call to stored procs
...
Reuse a CTE for results of call
2016-03-12 18:28:36 -08:00
Diogo Biazus
9d0f3573c6
Implements query counting in proc call and adds Content-Rage to response
...
headers in /rpc calls.
2016-02-26 14:51:35 -05:00
Diogo Biazus
893b7a7126
Applies range headers to /rpc calls using LIMIT/OFFSET.
2016-02-26 14:41:27 -05:00
Joe Nelson
d5c1438c6e
Use hasql-transaction
...
Also use hspec before-wrapper
2016-02-21 18:05:25 -08:00
Joe Nelson
b85fc37130
Protect against nulls that choke our decoder
2016-01-24 18:09:20 -08:00
Joe Nelson
75ebd1bd24
Derp, it is "commit" not "end"
2016-01-24 18:09:20 -08:00
Joe Nelson
cbb2ba7d42
Appease hlint
2016-01-24 18:09:20 -08:00
Joe Nelson
a0b390e735
Avoid possibilities of null for our chosen decoder
2016-01-24 18:09:20 -08:00
Joe Nelson
1f557a92a4
Pass query args properly
2016-01-24 18:09:20 -08:00
Joe Nelson
51f71eb53d
Run queries in a transaction again
2016-01-24 18:09:19 -08:00
Joe Nelson
8b13e7dd73
Header cannot be null even when it is n/a
2016-01-24 18:09:19 -08:00
Joe Nelson
cb3977679d
App.hs compiles (dubiously)
...
Removed query body is no longer a maybe value
2016-01-24 18:09:19 -08:00
Joe Nelson
7b92449343
QueryBuilder compiles with hasql 19
2016-01-24 18:09:18 -08:00
Moti Zilberman
9a596c2500
pgFmtLit: Change condition for using E"..." syntax, fix #458 .
...
Includes a test spec by @diogob.
2016-01-15 11:59:25 +02:00
calebmer
04e1186f08
Consistent read query escaping
2015-12-29 15:24:27 -05:00
Ruslan Talpa
a61778dba0
Fix bug in many-many relation detection introduced but prev PR
2015-12-22 16:36:02 +02:00
calebmer
d1de6615f2
Add back in missing dependency after rebase
2015-12-16 18:37:25 -05:00
calebmer
7392d204bf
More inclusive foreign key ducktyping
2015-12-16 18:24:04 -05:00
calebmer
ee82ad1864
Better documentation adding relations
2015-12-16 18:24:03 -05:00
calebmer
88d4798d5e
Add column select sans id support
2015-12-16 18:24:03 -05:00
calebmer
abe87f2f16
Add support for selecting by column
2015-12-16 18:24:02 -05:00