Ruslan Talpa
2f166088c8
response shaping and filtering for rpc proc calls
2016-06-28 12:09:58 +03:00
Ruslan Talpa
744bbf7203
cache the names of functions returning JWT and avoid extra query on each rpc call
2016-06-28 12:09:58 +03:00
Ruslan Talpa
a253ff325d
don't check if proc exists, just call it and return 400 if it does not
2016-06-28 12:09:57 +03:00
Jacky Hu
0be5f5299f
Reponse with the correct header for openapi
2016-06-18 10:18:43 +08:00
Jacky Hu
733b2cc05b
Move around encodeFn and realted helpers
2016-06-18 10:18:43 +08:00
Jacky Hu
d1ed884a8d
Introduce the OpenAPI header
...
Also bring back the original behavior of GET "/"
2016-06-18 10:18:43 +08:00
Jacky Hu
103fa0550c
Use a specific name for OpenAPI module
2016-06-18 10:18:43 +08:00
Jacky Hu
74ea4aba37
Fix all hlint errors except for pattern error
2016-06-18 10:18:43 +08:00
Jacky Hu
cf4e157de7
Provide a swagger2 spec for the dynamic API
...
Related issue: #144
2016-06-18 10:18:43 +08:00
Ruslan Talpa and Joe Nelson
b916ed907b
fix #637 ( #647 )
2016-06-17 10:45:25 -07:00
Joe Nelson
e315dbc91e
Include allow header in options response ( #628 )
2016-06-08 23:12:29 -07:00
Ruslan Talpa
6ebd7fd2d7
implement select/return representation for DELETE queries ( fix #518 )
2016-06-02 13:37:33 +03: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
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