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
Joe Nelson
592dd39222
Merge pull request #602 from ruslantalpa/order_limit_embeded
...
Ability to order embedded items (closes #509 )
2016-05-21 11:08:24 -07:00
Ruslan Talpa
45d0f85b0d
ability to order embeded items ( closes #509 )
2016-05-21 20:52:13 +03: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
Joe Nelson
18e3c30ad8
Return proper 401/403 when access denied
...
Fixes #584
2016-05-15 00:56:47 -07:00
Ruslan Talpa
c13f0a369b
Support node/column renaming #310
2016-05-12 10:22:19 +03:00
Ruslan Talpa
cacc725e41
support dash in column names fix #462
2016-05-11 10:43:34 +03:00
Joe Nelson
d9205bd838
Do not include Content-Type header for empty body ( #580 )
...
* Do not include Content-Type header for empty body
Fixes #544
* Fix lint
* Changelog
2016-05-03 21:18:23 -07:00
Joe Nelson
88aad4b1b6
Reload schema definition on SIGHUP ( #570 )
2016-04-26 07:50:23 -07:00
Joe Nelson
5aadfba84b
Use read-only transaction mode for read requests ( #561 )
...
* Make middleware use ApiRequest rather than Request
* Fix outdated comments
* Use read-only transaction mode for read requests
This allows API requests against read replicas
2016-04-15 12:26:40 -07:00
Joe Nelson
b858626e17
For correctness include charset=utf-8 in responses
2016-03-13 14:22:17 -07:00
Joe Nelson
e315ad99b4
Name the main module "Main" as required
2016-02-29 14:50:44 -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
8b3d224b80
Ensure payload parse errors are not suppressed
...
Fixes #490
2016-02-11 16:24:02 -08:00
Joe Nelson
e53fb10483
Fix lint
2016-02-03 11:36:17 -08:00
calebmer and Joe Nelson
33757e537b
Fix options on non existant tables, closes #442
2016-02-03 11:20:45 -08:00
Joe Nelson
a0ef4eae4d
Issue http 405 for anything but POST on RPC
...
Fixes #481
2016-02-01 22:52:57 -08:00
Joe Nelson
536acec820
Turn down warning level a little
2016-01-27 17:31:57 -08:00
Joe Nelson
cbb2ba7d42
Appease hlint
2016-01-24 18:09:20 -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
72cd6c37bd
Change some import statements and Session types
2016-01-24 18:09:18 -08:00
Ruslan Talpa
88d98d6d62
fix #453 by sending the request to the db (instead of using the cached data)
2016-01-11 10:17:34 +02:00
Ruslan Talpa
4544ce3255
Fix #399 insert records in tables with no SELECT privileges
2015-12-16 10:16:14 +02:00
Ruslan Talpa
1acd07cb61
fix #414 revert to separate count query
2015-12-15 12:04:04 +02:00
Joe Nelson
cbbb1871bb
Add --max-rows option (no automated tests yet)
...
Fixes #288
2015-12-05 19:03:18 -08:00
Diogo Biazus
be9cce0043
Moves createReadStatement and createWriteStatement to QueryBuilder since they build queries. Also reduces QueryBuilder module interface.
2015-11-23 13:45:10 -05:00
Ruslan Talpa
50745ad48b
Type refactoring (ApiRequest/DbRequest)
2015-11-23 10:12:29 +02:00
Joe Nelson
7f58600dbb
All green
...
But still unsightly
2015-11-22 22:38:54 -08:00
Joe Nelson
1f6fc5cbd8
Ensure JSON payload objects all have same keys
2015-11-22 13:51:46 -08:00
Joe Nelson
60007b5f10
WIP: Insertion memory leak fixed
...
But a whole lot of other things broken, including updates
2015-11-20 13:08:23 -08:00
Joe Nelson
f54742186b
Use show instances for a shortcut
2015-11-20 10:29:08 -08:00
Ruslan Talpa
78fd766de3
small refactor
2015-11-20 18:19:13 +02:00
Ruslan Talpa
0cce22f8c1
check request payload for structure & remove bad test for csv
2015-11-20 16:07:20 +02:00
Ruslan Talpa
f18cfbd7f4
Stricter pattern matching & case branches rearangement + remove a few small functions
2015-11-20 15:36:04 +02:00
Ruslan Talpa
f5bb898992
delete commented code
2015-11-20 14:10:28 +02:00
Ruslan Talpa
7f52430e0e
Get the refactored code to compile (5 test failing)
2015-11-20 14:04:00 +02:00
Joe Nelson
c80ab6be0f
WIP: converting App
2015-11-19 20:45:24 -08:00
Joe Nelson
87c946ef52
Treat JWT as a Secret, not String
2015-11-19 09:58:41 -08:00
Joe Nelson
c21e5a9fc8
Merge pull request #375 from calebmer/feature/plurality-singular
...
Implement single route selection
2015-11-18 14:39:33 -08:00
Ruslan Talpa
f24dd90e51
refactor buildSelectApiRequest
2015-11-17 14:19:23 +02:00
Ruslan Talpa
17920b85c7
Refactor parseRequest, add buildMutateApiRequest function
2015-11-17 10:26:06 +02:00
calebmer
ad555986d4
Error refactors
2015-11-16 17:28:39 -05:00
calebmer
54eb0d3ec4
Implement single route selection
2015-11-16 17:21:07 -05:00
Ruslan Talpa
0c3545fa09
App.hs refactor
2015-11-16 12:26:55 +02:00
Ruslan Talpa
75646247f2
Add type synonims to to beter explain things that used to be Text
2015-11-16 10:40:46 +02:00
Diogo Biazus
f47d5e52f4
Moves all PgQuery module to QueryBuilder
2015-11-14 22:54:55 -05:00
calebmer
2f6254f44c
Rename DbStructure names
2015-11-12 15:01:23 -05:00
calebmer
b8b073810f
Rename functions
2015-11-11 15:53:52 -05:00