Commit Graph
96 Commits
Author SHA1 Message Date
Diogo Biazus 578ae6b5dd Import GHC.Show without qualifying it 2016-06-30 08:35:42 -04:00
Diogo Biazus 7b9eb86fd0 Stop running openpi test until we figure out a way to run it in circle without a suite timeout 2016-06-29 10:14:38 -04:00
Diogo Biazus b17fa09393 Add explicit import Prelude to remaining modules to compile and run specs 2016-06-29 09:26:47 -04:00
Diogo Biazus 0e172b8030 Port Auth to prolude 2016-06-29 09:25:57 -04:00
Diogo Biazus 3308012dcf Add protolude to dependencies, include NoImplicitPrelude in default extensions and port Error module to protolude. 2016-06-29 09:25:57 -04:00
Diogo Biazus 376b67be9e Remove unnecessary string conversions 2016-06-29 00:18:29 -04:00
Diogo Biazus b68fcd2522 Replace lens dependency for microlens 2016-05-21 13:31:39 -04:00
Diogo Biazus abd81c998b jwtClaims should always return Left for invalid JWT 2016-05-21 13:18:45 -04: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 4496a95014 Updates changelog 2016-02-26 14:41:27 -05:00
Diogo Biazus 893b7a7126 Applies range headers to /rpc calls using LIMIT/OFFSET. 2016-02-26 14:41:27 -05:00
Diogo BiazusandJoe Nelson 01ab540ffe Simplify return from withResource in Main.hs 2016-02-20 18:03:17 -08:00
Diogo BiazusandJoe Nelson de848f64fa Return the results from withResource function before applying the respond continuation. This ensures that the pool resource is freed as soon as the database operation is complete 2016-02-20 18:03:06 -08:00
Diogo Biazus 5ee44c6c21 Adds section about multiple insertion/update to api/writing docs [#405] 2016-01-20 23:10:24 -05:00
Diogo Biazus 6534eeb1a2 Adds conclusion and note about token TTL 2015-12-20 15:04:18 -05:00
Diogo Biazus eef4e3c647 Tweaks the text, adds a design remark about SQL functions and adds the token TTL in HTTP cache headers 2015-12-20 14:45:22 -05:00
Diogo Biazus 1d848b8d72 Removes is_owner_or_admin and adds token expiration claim 2015-12-20 12:38:05 -05:00
Diogo Biazus 48c041a99f Renames v1schema in app.json to make consistent with current parameter semantics 2015-12-18 16:51:42 -05:00
Diogo Biazus 30a844ff58 Adds External Authentication in docs' examples section 2015-12-17 00:36:58 -05:00
Diogo Biazus 4cc0189ac9 Prefixes all roles used in test suite with postgrest_test 2015-12-08 12:03:46 -05:00
Diogo Biazus 8b4cb4be6e Replaces postgrest_authenticator for postgrest_test_authenticator 2015-12-08 11:53:18 -05:00
Diogo Biazus d95aeb15f9 Reduces privileges fixture to a smaller file so it's manageable without the use of pg_dump 2015-12-08 11:50:13 -05:00
Diogo Biazus 6cc8ca707f Separates privileges in another fixture 2015-12-08 11:33:22 -05:00
Diogo Biazus 63805d05a1 Removes GRANT ALL and let Structure spec pending 2015-12-08 11:11:48 -05:00
Diogo Biazus f66f9e7c92 Adds -d postgrest to setup database step in SpecHelper 2015-12-08 11:06:50 -05:00
Diogo Biazus ca3ab7babf Cleanup code in SpecHelper 2015-12-08 01:01:38 -05:00
Diogo Biazus 0961524e70 Refactors tests to use new fixtures and remove some haskell functions that wont be necessary anymore 2015-12-08 00:44:49 -05:00
Diogo Biazus 027bbc6074 Adds separate fixture file with commands to create test database 2015-12-08 00:00:00 -05:00
Diogo Biazus c1c44aae05 Adds separate fixture file with data used in specs 2015-12-07 23:59:33 -05:00
Diogo Biazus 65e7744858 Uses anti_id computed column to make test case clearer 2015-12-02 17:12:37 -05:00
Diogo Biazus c2e3dd716c Updates CHANGELOG 2015-12-02 15:28:27 -05:00
Diogo Biazus 1266bad2f8 Adds another note about computed coulmns to the docs 2015-12-02 15:27:27 -05:00
Diogo Biazus 71dab115c9 Uses qualified column name in order by clause to allow computed columns 2015-12-02 15:23:10 -05:00
Diogo Biazus addd47c09f Adds haddock string to QueryBuilder module 2015-11-23 13:56:47 -05: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
Diogo Biazus 9dc3399d4a Adds Schema type alias back to QueryBuilder 2015-11-15 10:18:34 -05:00
Diogo Biazus 9da7db9e09 Moves some top level bindings to 'where' when it makes sense 2015-11-14 23:08:35 -05:00
Diogo Biazus f47d5e52f4 Moves all PgQuery module to QueryBuilder 2015-11-14 22:54:55 -05:00
Diogo Biazus fbe6600ff1 Makes exports explicit and move some functions around 2015-11-14 22:43:03 -05:00
Diogo Biazus 2c1236652e Fixes hlint suggestions 2015-11-01 16:49:21 -05:00
Diogo Biazus 066d120c0e Changes stack resolver to nightly. 2015-10-31 12:01:26 -04:00
Diogo Biazus c6956d0ff6 Adds fix to CHANGELOG 2015-10-28 09:17:25 -04:00
Diogo Biazus 4369a5617e Fixes 500 when set returning function returns an empty row set [fix #332] 2015-10-27 21:19:55 -04:00
Diogo Biazus 5de9db0ca1 Updates stack resolver to 3.10 and adds new hspec to custom build plan 2015-10-23 15:44:18 -04:00
Diogo Biazus 91dfd47f1d Adds another test case for jwt with empty claims 2015-10-22 23:20:16 -04:00
Diogo Biazus aad19b53c7 Includes one test case for recovering from from 400 error and another for invalid JWT tokens 2015-10-22 23:12:14 -04:00
Diogo Biazus d000a6c61a Eliminates SET role duplication and changes Auth module interface 2015-10-22 00:08:02 -04:00
Diogo Biazus 81ee7cbd5e Removes redundant do 2015-10-20 19:54:29 -04:00
Diogo Biazus 250a4dcfb2 Adds back import to make GHC 7.8 happy 2015-10-20 19:51:25 -04:00
Diogo Biazus 6e55017f96 Cleans and adds haddock comments 2015-10-20 19:48:54 -04:00
Diogo Biazus a192cadced All green :D 2015-10-20 19:23:12 -04:00
Diogo Biazus 044e3865ac Removes 'Prefer: return=jwt' header and chooses jwt return based on function type 2015-10-20 01:03:11 -04:00
Diogo Biazus 2ea7bc29c6 Moves function from top level to where 2015-10-20 00:43:21 -04:00
Diogo Biazus a3aba84ba8 Fixes linter suggestions 2015-10-18 20:10:26 -04:00
Diogo Biazus 4e9afc8096 Adds import needed by ghc 7.8 2015-10-18 20:05:34 -04:00
Diogo Biazus f56efeb039 Reduces conde duplication assimbling response vody for RPC 2015-10-18 20:02:33 -04:00
Diogo Biazus 8b5f4e8556 Removes lenses and uses simpler approach to generate JWT claims. Also fixes the setVar to avoid the ::unknown type cast from insertableValue 2015-10-18 17:14:11 -04:00
Diogo Biazus 7ef5b7b43a Simplifies pattern matching using insertableValue and quote variable as identifier. 2015-10-18 14:03:43 -04:00
Diogo Biazus 241a38e958 Makes JWT generation possible in RPC endpoints
Fixes SET execution to execute in separate statements as Hasql uses
prepared statements we need to send 1 commend per statement.
2015-10-18 02:30:32 -04:00
Diogo Biazus aae55e0282 Make complete match agains ClaimsMap in setVar 2015-10-17 20:41:42 -04:00
Diogo Biazus 31f1a30d6f Cleans imports in Middleware and define exports in Auth 2015-10-16 15:56:07 -04:00
Diogo Biazus 275002e25d Adds dbrole filter back to root path querying the database 2015-10-16 15:55:56 -04:00
Diogo Biazus 3add3f5b6c First draft of big auth simplification 2015-10-16 15:55:47 -04:00
Diogo Biazus adfd980a60 Moves minimum pg version to config, eliminates magic constant from main and improves docs. 2015-10-06 20:27:54 -04:00
Diogo Biazus 3020812f71 Adds basic haddock comments on Config module 2015-10-05 21:14:18 -04:00
Diogo Biazus ed9eea3e8b Imports (<>) from Data.Monoid 2015-10-05 18:53:44 -04:00
Diogo Biazus 346170220e Uses empty password by default 2015-10-05 14:58:53 -04:00
Diogo Biazus 3a1f7938e8 Moves all config related code to PostgREST.Config module and
tweak the code to better encapsulate functionality.
2015-10-05 14:50:35 -04:00
Diogo Biazus 4dd508a628 Adds a failing spec for child relation (comments) using a composite foreign key (references to users_tasks) 2015-10-03 15:02:02 -04:00
Diogo Biazus 0df6ea57ae Updates stackage resolver to 3.7 2015-09-30 23:35:44 -04:00
Diogo Biazus f0ec46fd11 Fix count=none when we have filters 2015-09-30 16:50:52 -04:00
Diogo Biazus efd6580b26 Adds Prefer count=none to changelog 2015-09-25 13:22:19 -04:00
Diogo Biazus f08512eaa9 Updates optparse-applicative package version constraints 2015-09-25 12:19:24 -04:00
Diogo Biazus e28b2dd00e Implements Prefer count=none header
Uses Maybe for total parameter in contentRangeH
2015-09-25 10:52:44 -04:00
Diogo Biazus 1fbf276474 Adds spec for Prefer header set to count=none 2015-09-24 18:31:36 -04:00
Diogo Biazus 922aa702a2 Adds fix to changelog 2015-09-01 15:58:07 -04:00
Diogo Biazus 89c581816e Adds */* as a valid media type that will return json [fix #274] 2015-09-01 15:57:59 -04:00
Diogo Biazus 52626cc86d Adds test cases for not operator in equality, inequality, like, ilike, tesarch (@@) and is null queries 2015-08-21 15:08:52 -04:00
Diogo Biazus 32b97ef076 Adds not as a keyword that can optionally be prepended to any operator in a parameter value 2015-08-21 10:33:41 -04:00
Diogo BiazusandJoe Nelson 3b017dfdf6 Adds 415 response for any non-empty Accept header different from application/json or text/csv. Uses apropriate Content-Type header when sending CSV format. 2015-08-20 20:47:36 -07:00
Diogo BiazusandJoe Nelson cb7d00b839 Adds tags file to gitignore 2015-08-20 20:47:36 -07:00
Diogo Biazus c34f96ce2e Removes body matcher to compile and test against any aeson version >= 0.8 2015-08-20 16:43:57 -04:00
Diogo Biazus f9d50018d9 Rollback to aeson 0.8.0.2 to allow building with stackage, and adds stack.yml 2015-08-20 15:50:28 -04:00
Diogo Biazus 6c1233fcec Adss stack-work directory to gitignore 2015-08-20 15:15:53 -04:00
Diogo Biazus 9d5011e864 Implements CSV resnponse for the appropriate accept headers 2015-08-14 11:04:26 -04:00
Diogo Biazus ca40ba1fda Refactors app function to DRY header lookups 2015-08-14 11:04:26 -04:00
Diogo Biazus b45953dff8 Mentions fix in CHANGELOG 2015-08-01 01:23:31 -04:00
Diogo Biazus 8075d7e51a Mentions fix in CHANGELOG 2015-08-01 01:21:42 -04:00
Diogo Biazus ab0170ffaf Adds materialized views to list of relations in GET / [#242] 2015-08-01 01:09:12 -04:00
Diogo Biazus 449cacdacf Fixes error code 42803 when trying to query a view with a column named count. 2015-08-01 00:15:17 -04:00
Diogo Biazus c76864a653 Qualifies columns used in WHERE clauses so we can use computed columns as filters 2015-07-10 12:35:24 -04:00
Diogo Biazus 9c69553373 Verifies PostgreSQL version is supported (+9.2) before spawning server [fixes #157] 2015-07-02 09:26:58 -04:00
Diogo Biazus e87be593c0 Removes toBool function as we now cast the 'YES/NO' values to boolean in PostgreSQL's queries 2015-06-22 18:09:45 -04:00
Diogo Biazus f4011e5d8c Changes the insertable to true in views that are insertable through triggers [fixes #206] 2015-06-22 00:16:23 -04:00
Diogo Biazus a980db6d2d Adds spec for @@ operator and implements it in PgQuery 2015-05-22 12:28:26 -04:00
Diogo Biazus 4277284a69 Adds table tsearch to test for @@ operator against a tsvector field. Fixes StructureSpec accordingly. 2015-05-22 12:15:14 -04:00