Commit Graph

211 Commits

Author SHA1 Message Date
Kamirus
e9d9e4ea0f nested tuple with one element: Tuple a Unit; and test 2018-11-16 13:46:19 +01:00
Petri Lehtinen
10a868b166 Implement monadic error handling, get rid of JavaScript exceptions
- Add `PGError` type to model different errors that can happen when
  querying PostgreSQL. The mapping from SQLSTATE to error was inspired
  by `psycopg2`.

- Run all actions in a new `PG` monad, which is just `Aff` stacked
  with `ExceptT PGError` to provide monadic error handling. Any errors
  caused by database access are not thrown as JavaScript exceptions
  anymore.

- While at it, remove some duplication between `query` and `command`
  by reusing `ffiUnsafeQuery` in both cases.
2018-11-16 13:40:30 +02:00
Tomasz Rybarczyk
2fa1c0551e v2.4.4 2018-10-22 18:20:30 +02:00
paluh
1fd636dc1e
Merge pull request #27 from akheron/fix-purs-bundle
FFI: Fix `purs bundle` output
2018-10-22 16:54:54 +02:00
paluh
59542259ff
Merge pull request #28 from bouzuya/fix-link
README: fix links
2018-10-22 16:54:00 +02:00
Petri Lehtinen
ab46bbf47f Fix purs bundle output
`purs bundle` (used by e.g. `pulp build`) fails to output `DATE_OID`
in the output bundle due to some dead code elimination bug/feature, so
an app using `purescript-postgresql-client` fails to start.

Remove `DATE_OID` and use its value inline instead.
2018-10-22 12:46:51 +03:00
bouzuya
98329846d2 fix links 2018-10-22 10:27:35 +09:00
Tomasz Rybarczyk
943368875b v2.4.3 2018-10-21 17:59:42 +02:00
Tomasz Rybarczyk
d07a05f558 Drop custom test script and use npm scripts for this purpose. 2018-10-21 17:58:51 +02:00
Tomasz Rybarczyk
b0809de370 v2.4.2 2018-10-21 11:51:25 +02:00
Tomasz Rybarczyk
1d75dd5644 README: Add withTransaction to the docs. 2018-10-21 11:50:20 +02:00
Tomasz Rybarczyk
f7f2e3c960 README: minor improvements 2018-10-21 11:41:25 +02:00
Tomasz Rybarczyk
51cfe5b6ff README: Improve formatting 2018-10-21 11:39:25 +02:00
Tomasz Rybarczyk
58de927019 v2.4.1 2018-10-21 04:32:14 +02:00
Tomasz Rybarczyk
549e9db342 bower.json: Update deps 2018-10-21 04:31:41 +02:00
Tomasz Rybarczyk
ac3fe8bf8c v2.4.0 2018-10-21 04:31:16 +02:00
Tomasz Rybarczyk
fffd34d4e1 s/Guide/Example/ 2018-10-21 04:30:23 +02:00
Tomasz Rybarczyk
2210e1f8a6 .gitignore: Add test/Example.purs 2018-10-21 04:29:18 +02:00
Tomasz Rybarczyk
48dabc51c2 README: Typo 2018-10-21 04:22:55 +02:00
Tomasz Rybarczyk
8248270a7f README: Finish example 2018-10-21 04:22:16 +02:00
Tomasz Rybarczyk
8da7364758 README: Style 2018-10-21 03:58:45 +02:00
Tomasz Rybarczyk
fa18cc86e2 README: Cleanup 2018-10-21 03:57:46 +02:00
Tomasz Rybarczyk
85e01d38fe README: add query usage example 2018-10-21 03:56:11 +02:00
Tomasz Rybarczyk
e21bd27173 README: Add "Testing" section 2018-10-21 03:32:06 +02:00
Tomasz Rybarczyk
751ced6d76 Make most fields optional in PoolConfiguration 2018-10-21 03:24:58 +02:00
Tomasz Rybarczyk
8683419e85 Allow nested tuples to be used as query rows 2018-10-21 03:20:58 +02:00
Tomasz Rybarczyk
c0ac46c00a Improve command docs 2018-10-20 22:34:00 +02:00
Tomasz Rybarczyk
2da6a3a767 Add command function returning command tag value of a query 2018-10-20 22:34:00 +02:00
paluh
3363bffce8
Merge pull request #26 from akheron/issue-24
WIP: Avoid `UnhandledPromiseRejectionWarning` on integrity errors
2018-10-20 20:35:29 +02:00
Petri Lehtinen
9eb66e7068 Avoid UnhandledPromiseRejectionWarning on integrity errors 2018-10-12 08:01:34 +03:00
Tomasz Rybarczyk
13eb0ef583 Cosmetics 2018-10-08 16:08:30 +02:00
Tomasz Rybarczyk
9ae93cede4 Add test for DELETE query which returns removed rows. 2018-10-08 15:57:33 +02:00
paluh
624cf730e6
Merge pull request #22 from Kamirus/master
sql value for Object
2018-09-06 13:17:50 +02:00
Kamirus
248058bf2f sql value for Object 2018-09-06 12:15:05 +02:00
paluh
eb937a4a60
Merge pull request #21 from Kamirus/master
type support for jsdate
2018-09-05 18:19:02 +02:00
Kamirus
0a01eec77b remove datetime 2018-09-05 18:13:49 +02:00
Kamirus
eadcc58da1 type support for jsdate 2018-09-05 09:59:30 +02:00
paluh
652cb4f78e
Merge pull request #20 from Kamirus/master
tests for 0.12
2018-09-04 19:00:14 +02:00
Kamirus
9ed14c1bb5 tests for 0.12 2018-09-04 15:30:02 +02:00
paluh
ebf25a87d2
Merge pull request #19 from adamczykm/master
Migrate to Purescript 0.12.
2018-09-03 01:37:33 +02:00
adamczykm
bead426f14 Migrate to Purescript 0.12. 2018-07-15 19:51:17 +02:00
Tomasz Rybarczyk
bceb1e399d v2.3.0 2018-04-24 16:40:15 +02:00
Tomasz Rybarczyk
ed2ce9e592 Handle date with parsing on PS side 2018-04-22 18:15:43 +02:00
Tomasz Rybarczyk
037486a7ea v2.2.0 2018-04-22 16:53:27 +02:00
Tomasz Rybarczyk
94ed11d6cb README: Cosmetics 2018-04-22 16:52:32 +02:00
Tomasz Rybarczyk
bb493e5983 Migrate tests to purescript-test-unit + Instant fetching + test 2018-04-22 16:47:07 +02:00
Tomasz Rybarczyk
45eb1acb91 Drop scary message from README 2018-04-21 14:32:43 +02:00
Tomasz Rybarczyk
9c006c72ce Handle numeric values using purescript-decimals 2018-04-21 13:12:20 +02:00
paluh
63c21fb220
Merge pull request #15 from abhin4v/patch-1
Makes `Array Foreign` an instance of ToSQLRow
2018-04-21 12:15:15 +02:00
paluh
3e2a2633de
Merge pull request #16 from paluh/master
Upgrade to purescript-aff 4.0.0
2018-04-21 12:05:15 +02:00