Kamirus
6ce8b99ecd
README update; withConnection and withTransaction flipped parameter
2019-08-30 12:15:05 +02:00
Kamirus
ec1f6e447d
drop PG type and change functions in PG module; some test changes; no README fix
2019-08-28 17:00:36 +02:00
Tomasz Rybarczyk
df492b108d
Improve test debug log
2018-12-22 19:47:31 +01:00
Tomasz Rybarczyk
a6deace1cb
Make tests pass
2018-12-16 18:35:58 +01:00
Tomasz Rybarczyk
3e074d1c0c
Make tests pass
2018-12-06 20:14:08 +01:00
paluh
89e3282ba6
Merge branch 'master' into master
2018-12-03 19:10:02 +01:00
Petri Lehtinen
55d3ddd1bb
Address test comments
2018-11-30 08:31:18 +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
85e01d38fe
README: add query
usage example
2018-10-21 03:56:11 +02:00
Tomasz Rybarczyk
8683419e85
Allow nested tuples to be used as query rows
2018-10-21 03:20:58 +02:00
Tomasz Rybarczyk
2da6a3a767
Add command
function returning command tag value of a query
2018-10-20 22:34:00 +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
Kamirus
248058bf2f
sql value for Object
2018-09-06 12:15:05 +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
Kamirus
9ed14c1bb5
tests for 0.12
2018-09-04 15:30:02 +02:00
Tomasz Rybarczyk
ed2ce9e592
Handle date with parsing on PS side
2018-04-22 18:15:43 +02:00
Tomasz Rybarczyk
bb493e5983
Migrate tests to purescript-test-unit + Instant fetching + test
2018-04-22 16:47:07 +02:00
Tomasz Rybarczyk
9c006c72ce
Handle numeric values using purescript-decimals
2018-04-21 13:12:20 +02:00
Tomasz Rybarczyk
f6f3328149
Improve coding style a bit
2017-12-05 22:12:01 +01:00
Tomasz Rybarczyk
6a0f231eb7
Upgrade to purescript-aff 4.0.0
2017-12-04 22:43:36 +01:00
rightfold
ac05e01a97
Test withTransaction
2017-06-03 13:59:30 +02:00
rightfold
c1f9391701
Remove tuple machinery in favour of row types
...
These are more efficient and provide better error messages.
2017-06-03 13:27:14 +02:00
rightfold
64c84351ec
Add tests
2017-05-06 17:09:05 +02:00