purescript-postgresql-client/test
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
..
Main.purs Implement monadic error handling, get rid of JavaScript exceptions 2018-11-16 13:40:30 +02:00