Commit Graph
53 Commits
Author SHA1 Message Date
Adam C. Baker a973020748 handle inserting no data correctly
with "insert into [table] default values"
2014-10-10 16:52:01 -07:00
Adam C. Baker 0879ed7110 flip app args 2014-10-10 15:54:05 -07:00
Joe Nelson a34051b177 Successful PUT requests actually return 200 2014-10-09 18:00:37 -07:00
Adam C. Baker ef6b38ea1e reformat raw sql for readability 2014-10-09 14:11:35 -07:00
Adam C. Baker ea17642f08 Better error for mkColumn 2014-10-09 14:11:21 -07:00
Adam C. Baker 5dd3f9c79a Merge branch 'fk'
Conflicts:
	src/PgStructure.hs
	test/Feature/StructureSpec.hs
	test/fixtures/schema.sql
2014-10-09 12:30:39 -07:00
Joe Nelson ecff987f31 Include "enum" field in column details 2014-10-08 16:51:42 -07:00
Adam C. Baker ee02a98cf2 emit references for columns with foreign keys 2014-10-08 16:38:12 -07:00
Adam C. Baker c9fc2154ab fix basic auth parsing 2014-10-08 16:37:30 -07:00
Adam C. Baker f0e8d23dd2 getting foreign key data with a column. 2014-10-08 15:20:26 -07:00
Adam C. Baker 59f9855362 return a map of foreign keys 2014-10-08 15:20:26 -07:00
Adam C. Baker d16ecdc28f data/procedure for foreign key 2014-10-08 15:20:26 -07:00
Joe Nelson 527d51670c WIP: Trap postgres errors in middleware
Fixes #39
2014-10-08 14:58:38 -07:00
Joe Nelson 68d0a38806 WIP: feature specs for auth 2014-10-08 14:48:31 -07:00
Joe Nelson 8fbe3839a6 Allow browsers to load table OPTIONS after preflight
Fixes #51
2014-10-07 14:55:11 -07:00
Joe Nelson 496e8421a9 Provide column default values in OPTIONS
Fixes #43
2014-10-07 11:56:54 -07:00
Joe Nelson 2f37b6caeb Rudimentary cors feature spec 2014-10-03 16:00:06 -07:00
Adam C. BakerandJoe Nelson dac9f02578 allow options, capital Authorization. 2014-10-03 14:47:29 -07:00
Adam C. BakerandJoe Nelson 0067f60316 first pass at CORS handling. 2014-10-03 14:47:29 -07:00
Joe Nelson 6b325e0139 Make the anonymous pg role a mandatory argument 2014-10-03 13:56:02 -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 e5c4567166 Gzip compression 2014-09-29 14:06:42 -07:00
Joe Nelson 2f584be0d6 HTTPS only 2014-09-29 14:06:20 -07:00
Joe Nelson 631f651f44 List table columns as array, not hash 2014-09-29 11:40:20 -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 016490bea7 Fix hlint 2014-09-10 21:32:30 -07:00
Joe Nelson d3ae4aca2b All tests passing except hlint warning about duplicated code blocks 2014-09-10 21:20:56 -07:00
Joe Nelson dd9d9cb283 Disallow non-idempotent PUTs 2014-09-10 20:44:17 -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 a4227b94d8 Add Content-Location header to GET responses
Fixes #26
2014-09-07 17:01:35 -07:00
Joe Nelson 4d81959a2a Fix Location link in post to db lacking a primary key
Fixes #29
2014-09-07 14:12:51 -07:00
Joe Nelson fcdc37d20b Reject ranges that start beyond last item 2014-09-07 12:47:07 -07:00
Joe Nelson db7ccda74d Test for no results case 2014-09-07 11:02:43 -07:00
Joe Nelson 7802fa5b7e Respond with 200 or 206 in ranged responses 2014-09-07 09:38:30 -07:00
Joe Nelson 74e16abaa1 Alphabetize table names in "/" to make test pass reproducibly 2014-09-01 21:06:45 -07:00
Joe Nelson 134ca1f2a8 Parse JSON -> SqlValue as Int as well as Double when possible 2014-08-26 22:38:09 -07:00
Joe Nelson 780c9d7c0f Include location header in post response 2014-08-25 11:31:27 -07:00
Joe Nelson a48474b21a respond 201 on successful post 2014-08-23 21:49:43 -07:00
Joe Nelson 036ffa107b Feature tests pass, unit test does not 2014-08-23 18:08:20 -07:00
Joe Nelson d6004ee41f Disable auto-transactions 2014-08-23 15:34:09 -07:00
Joe Nelson 011c7acec9 First feature specs 2014-08-16 22:33:37 -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