Commit Graph
48 Commits
Author SHA1 Message Date
Joe Nelson 4c74e54ae1 Do not add WHERE clause if only param is order
Fixes #119
2015-01-05 22:37:49 -08:00
Joe Nelson 9712549d64 Use "::unknown" type casts to overcome binary protocol restrictions
Fixes #112
2014-12-16 20:09:01 -08:00
Joe Nelson ca4138df2a Send back Location header on insert 2014-12-06 17:42:21 -08:00
Joe Nelson 8e9bbe6dcb Fix insert 2014-12-06 17:42:20 -08:00
Joe Nelson d6e3526bff Use Text for textual data
Also upgrade Hasql
2014-12-06 17:42:20 -08:00
Joe Nelson d2888c62f1 hasql wants to rowParse text not bytestring 2014-12-06 17:42:19 -08:00
Joe Nelson 70d9641e35 WIP: More files converted to Hasql 2014-12-06 17:42:19 -08:00
Joe Nelson 8ebfbccd08 WIP: converting to Hasql 2014-12-06 17:42:19 -08:00
Joe Nelson b74b91b1c0 Interpolate json string values in queries without extra quoting 2014-12-06 17:42:19 -08:00
Joe Nelson d9377fa50a Fix select star and json stuff 2014-12-06 17:42:18 -08:00
Joe Nelson 61174cfa17 Add user creation route 2014-12-06 17:42:18 -08:00
Joe Nelson 8c073cedc6 Add PATCH handler 2014-12-06 17:42:17 -08:00
Joe Nelson 361cffc283 Add PUT handler 2014-12-06 17:42:17 -08:00
Joe Nelson 8894400f5c Add POST handler 2014-12-06 17:42:17 -08:00
Joe Nelson cb80dba234 WIP: converting app request handlers 2014-12-06 17:42:17 -08:00
Joe Nelson 7196fbc001 WIP: use postgresql-simple in pgstructure 2014-12-06 17:42:16 -08:00
Joe Nelson 2f91fdd8b5 WIP: more clean query functions 2014-12-06 17:42:16 -08:00
Joe Nelson cb467b62c1 WIP: cleaner PgQuery functions 2014-12-06 17:42:16 -08:00
Joe Nelson 58adb5e828 Allow patch requests
Fixes #87
2014-11-06 23:49:29 -08:00
Joe Nelson 76ea92bfce Derp, actually put the data on a put request 2014-11-06 18:31:13 -08:00
Adam C. Baker 74855db87b declare required extensions
and remove default extension pragmas (OverloadedStrings)
2014-11-05 00:32:10 -08:00
Joe Nelson cc2c65a9ab Build escaped queries in the app itself
universally replace String with Text
2014-11-03 23:30:04 -08:00
Joe Nelson c27f178754 Create functions that mimic Postgres' format() command 2014-11-03 19:53:54 -08:00
Joe Nelson 822c9aad22 Cannot use query param for set role. Concat should be safe though 2014-11-02 00:23:24 -07:00
Joe Nelson 1a83f2d344 Stop using strings, they are dog slow 2014-11-02 00:10:37 -07:00
Joe Nelson 572c235b79 Add /dbapi/users route for creating new user 2014-10-21 15:01:04 -07:00
Joe Nelson 21e4e583ec Return [] rather than nothing on no results
Fixes #70
2014-10-14 11:23:26 -07:00
Joe Nelson fbb13f4ab3 Accept order query param
Fixes #66
2014-10-13 22:29:28 -07:00
Adam C. Baker f7c825f646 rename pgSetRole, pgResetRole to setRole, resetRole 2014-10-13 16:46:33 -07:00
Adam C. Baker a973020748 handle inserting no data correctly
with "insert into [table] default values"
2014-10-10 16:52:01 -07:00
Joe Nelson 68d0a38806 WIP: feature specs for auth 2014-10-08 14:48:31 -07:00
Adam C. Baker bfa6a968a6 more unit-y unit tests 2014-10-01 15:42:57 -07:00
Joe Nelson 598d70579e WIP: change db roles based on HTTP basic auth headers 2014-09-29 22:52:02 -07:00
Joe Nelson b29e07538c Manage passwords with bcrypt 2014-09-29 17:45:36 -07:00
Adam C. BakerandJoe Nelson 14fa20f0e6 addUser function. 2014-09-29 15:52:01 -07:00
Joe Nelson 29d278f6bd One string conversion to rule them all 2014-09-28 10:41:37 -07:00
Adam C. Baker 29b70ca035 selective exports hides implementation details. 2014-09-26 13:25:32 -07:00
Adam C. Baker a93065a887 specify schema as a string everywhere in the app.
This will make it easier to support semantic API versioning,
and makes code reuse easier right now.
2014-09-26 12:51:36 -07:00
Joe Nelson 909661f899 Remove random comments 2014-09-11 20:22:52 -07:00
Joe Nelson 9f2a01ae46 WIP: do crazy postgres upsert 2014-09-09 22:46:42 -07:00
Joe Nelson 22114532e6 WIP: put requests 2014-09-07 22:03:45 -07:00
Joe Nelson fcdc37d20b Reject ranges that start beyond last item 2014-09-07 12:47:07 -07:00
Joe Nelson 780c9d7c0f Include location header in post response 2014-08-25 11:31:27 -07:00
Joe Nelson d6004ee41f Disable auto-transactions 2014-08-23 15:34:09 -07:00
Joe Nelson e9c232976e Use version number for schema in tests like anticipated use case 2014-08-14 13:23:41 -07:00
Joe Nelson d25da99f10 Use integers for schemas in insert 2014-08-14 10:03:07 -07:00
Joe Nelson 66839c012f Commit after insert, but not in test 2014-08-12 21:17:43 -07:00
Joe Nelson 6391c73184 Move sources into src 2014-08-10 13:13:32 -07:00