1fe1639265
feat: int8 support
2023-12-16 15:24:47 -06:00
f8e31d1d67
chore: fmt
2023-12-16 15:13:37 -06:00
6148009a0b
fix: migrate fork to spago@next, bun
2023-12-16 15:03:00 -06:00
Tomasz Rybarczyk
55075095ed
Use purs-tidy to format code
2023-02-25 19:20:16 +01:00
Tomasz Rybarczyk
343ea87283
Upgarde to purs-15
2023-02-25 19:10:41 +01:00
Tomasz Rybarczyk
0019baea2f
Fix warnings. Add trivial helpers for queries with no input.
2021-11-09 10:38:12 +01:00
Tomasz Rybarczyk
d2765285e4
Drop legacy module
2021-11-09 09:44:19 +01:00
Tomasz Rybarczyk
82352466a6
Update deps + minor fixes
2021-11-09 09:02:46 +01:00
Tomasz Rybarczyk
91504c4e86
Minor refactoring
2021-11-09 09:02:46 +01:00
Tomasz Rybarczyk
631fef38f8
Rename connection
to client
property in ConnectResult
2021-11-09 09:02:46 +01:00
Tomasz Rybarczyk
7e03b445a6
Carry original exception instance in our error report
2021-11-09 09:02:46 +01:00
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
5ba18264c7
feat: Could not match type NonEmptyList with type Array
2021-02-11 21:31:17 +02:00
Serhii Khoma
f79de31fde
feat: update to purs 0.14
2021-02-09 22:25:22 +02:00
Tomasz Rybarczyk
eab7041bca
Fix pool property fetching
2020-11-09 17:20:34 +01: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
Serhii Khoma
e74e715266
refactor: Database.PostgreSQL.PG -> remove unused type alias Database
2019-12-12 11:08:59 +02:00
Tomasz Rybarczyk
0df63e841d
Handle Argonaut.Json
2019-11-10 15:27:24 +01:00
Tomasz Rybarczyk
67960570a5
Drop pg import from Value.js
so typeclasses are accessible for frontend JS.
2019-09-30 11:11:05 +02:00
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
Jordan Martinez
fa843a350f
Update API due to breaking change
2019-07-27 13:22:14 -07:00
Tomasz Rybarczyk
45d6356fd8
Drop problematic newtype instances and provide helpers instead
2019-07-05 16:42:00 +02:00
Tomasz Rybarczyk
351a91af68
Default to newtype in *SQLValue
classes instance chains.
2019-07-05 16:17:04 +02:00
Tomasz Rybarczyk
600c643738
Hoist to correct monad in PG.hoist*
2018-12-22 19:52:37 +01:00
Tomasz Rybarczyk
bd055928ae
More polymorphic hoist functions
2018-12-22 18:32:24 +01:00
Tomasz Rybarczyk
07e1c0924b
More fine grained hoist function
2018-12-16 20:02:24 +01:00
Tomasz Rybarczyk
a04090da0b
Fix coding style
2018-12-16 18:58:02 +01:00
Tomasz Rybarczyk
280320b553
Add hoistPG function
2018-12-16 18:55:37 +01:00
Tomasz Rybarczyk
a6deace1cb
Make tests pass
2018-12-16 18:35:58 +01:00
Tomasz Rybarczyk
6f2b198d02
Move PG
into separate module
2018-12-16 18:05:49 +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
paluh
89e3282ba6
Merge branch 'master' into master
2018-12-03 19:10:02 +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
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
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
Tomasz Rybarczyk
85e01d38fe
README: add query
usage example
2018-10-21 03:56:11 +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