Tomasz Rybarczyk
b102e8ac8f
Make Connection
a newtype
2021-11-09 09:02:46 +01:00
Tomasz Rybarczyk
4c738fe72f
s/Connection/Client/ + s/DBHandle/Connection/
2021-11-09 09:02:46 +01:00
Tomasz Rybarczyk
76a5b41f3e
Introduce pool based queries. Move Aff API to separate submodule.
2021-11-09 09:02:39 +01:00
Tomasz Rybarczyk
e344b2c004
Update deps
2021-11-08 20:20:19 +01:00
Serhii Khoma
f79de31fde
feat: update to purs 0.14
2021-02-09 22:25:22 +02:00
Tomasz Rybarczyk
26bb7ee471
Separate Pool module. Make test database configurable.
2020-11-09 15:54:23 +01:00
isaac tovsky
7e1d5e2248
format records appropriately
2020-04-30 10:57:33 +02:00
isaac tovsky
c45e9e80eb
parse from postgres uri to ConnectionPool config
2020-04-13 22:58:24 +02:00
Serhii Khoma
a01442a2c8
feat: Database.PostgreSQL -> ConnectResult type -> export
2019-12-22 13:51:22 +02:00
Serhii Khoma
71c12d616b
feat: Database.PostgreSQL -> export connect function
2019-12-22 13:48:48 +02:00
Tomasz Rybarczyk
a6deace1cb
Make tests pass
2018-12-16 18:35:58 +01:00
Tomasz Rybarczyk
87d6f7fc95
Drop ExceptT
from functions
2018-12-09 21:50:13 +01:00
Tomasz Rybarczyk
111790af84
Let newPool
run in Effect
monad
2018-12-06 20:08:48 +01:00
Petri Lehtinen
de6404b82f
Make ffiUnsafeQuery better typed, fix indentation
2018-11-30 08:35:29 +02:00
Petri Lehtinen
331b681bbf
Revisit docstrings
2018-11-19 08:25:59 +02: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
751ced6d76
Make most fields optional in PoolConfiguration
2018-10-21 03:24: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
adamczykm
bead426f14
Migrate to Purescript 0.12.
2018-07-15 19:51:17 +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
feadfc2694
Use makeAff instead of importing PS in FFI code
2017-06-03 13:43: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
William Wolf
862257df9b
Update for 0.11
2017-04-20 01:19:05 -07:00
rightfold
552e59ad92
Use more descriptive error messages for invalid row structures
2017-04-18 14:33:43 +02:00
rightfold
e58c71e26c
Add FromSQLValue Number
2017-04-18 14:19:57 +02:00
rightfold
8e09f99502
Make FromSQLRow work on any number of columns
2017-04-14 14:21:48 +02:00
rightfold
a68279e6c4
Add FromSQLValue Boolean instance
2017-04-04 13:33:19 +02:00
rightfold
0566be6dee
Add ToSQLValue Number instance
2017-03-21 11:00:56 +01:00
rightfold
57ca84c05b
Throw Eff exception instead of Partial exception when row structure does not match
2017-03-17 14:56:50 +01:00
rightfold
c14897d6ed
Support Instant serialization
2017-01-30 11:12:55 +01:00
rightfold
4589da021b
Support any row length in ToSQLRow
2017-01-27 12:55:32 +01:00
rightfold
422e4ce9ae
ToSQLValue Boolean
2017-01-27 12:50:12 +01:00
rightfold
a8c34f37f9
Add Maybe support
2017-01-12 19:23:43 +01:00
rightfold
b9c7dbedea
Add scalar convenience function
2017-01-12 17:12:59 +01:00
rightfold
9609e8c94f
Add support for Int
2017-01-12 16:52:02 +01:00
rightfold
ada69d008a
Add ByteString support
...
Fixes #5 .
2017-01-07 15:30:31 +01:00
rightfold
370f8ca6b7
Add documentation comments
2016-12-24 13:38:36 +01:00
rightfold
726edddffd
Add "char" to Char mapping
2016-12-24 00:11:23 +01:00
rightfold
001bdeb8c9
Add typed queries
2016-12-22 20:25:17 +01:00
rightfold
50b88ebbf1
Extract from dinote
2016-12-22 19:12:38 +01:00