Commit Graph

118 Commits

Author SHA1 Message Date
Tomasz Rybarczyk
111790af84 Let newPool run in Effect monad 2018-12-06 20:08:48 +01:00
paluh
b6f3e11a5d
Merge pull request #30 from Kamirus/master
nested tuple with one element: Tuple a Unit
2018-12-03 19:10:13 +01:00
paluh
89e3282ba6
Merge branch 'master' into master 2018-12-03 19:10:02 +01:00
paluh
718d0c45bf
Merge pull request #29 from akheron/error-handling
Implement monadic error handling, get rid of JavaScript exceptions
2018-12-03 19:06:39 +01:00
Petri Lehtinen
de6404b82f Make ffiUnsafeQuery better typed, fix indentation 2018-11-30 08:35:29 +02:00
Petri Lehtinen
55d3ddd1bb Address test comments 2018-11-30 08:31:18 +02:00
Petri Lehtinen
331b681bbf Revisit docstrings 2018-11-19 08:25:59 +02:00
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