Yoga.Postgres.Om
- Package
- purescript-yoga-postgres-om
- Repository
- rowtype-yoga/purescript-yoga-postgres-om
#query Source
query :: forall @a ctx err. ReadForeign a => SQL -> Array PGValue -> Connection -> Om ctx (parseError :: MultipleErrors | err) (Array a)Query and parse rows using yoga-json's ReadForeign (DEFAULT) Throws parse errors to the Om exception channel
#queryOne Source
queryOne :: forall @a ctx err. ReadForeign a => SQL -> Array PGValue -> Connection -> Om ctx (parseError :: MultipleErrors | err) (Maybe a)Query one row and parse using yoga-json's ReadForeign (DEFAULT) Throws parse errors to the Om exception channel
#unsafe Source
unsafe :: forall @a ctx err. ReadForeign a => SQL -> Array PGValue -> Connection -> Om ctx (parseError :: MultipleErrors | err) aUnsafe query (expects exactly one row) and parse using yoga-json (DEFAULT) Throws parse errors to the Om exception channel
#queryUnsafe Source
queryUnsafe :: forall @a ctx err. SQL -> Array PGValue -> Connection -> Om ctx err (Array a)Query and unsafeCoerce rows to the desired type (bypasses yoga-json parsing) USE WITH CAUTION - no runtime validation!
#queryOneUnsafe Source
queryOneUnsafe :: forall @a ctx err. SQL -> Array PGValue -> Connection -> Om ctx err (Maybe a)Query one row and unsafeCoerce to the desired type (bypasses yoga-json parsing) USE WITH CAUTION - no runtime validation!
#unsafeUnsafe Source
unsafeUnsafe :: forall @a ctx err. SQL -> Array PGValue -> Connection -> Om ctx err aUnsafe query (expects exactly one row) and unsafeCoerce to the desired type USE WITH CAUTION - no runtime validation!
#executeSimple Source
executeSimple :: forall ctx err. SQL -> Connection -> Om ctx err IntOm-friendly executeSimple (takes Connection as parameter)
#transaction Source
transaction :: forall ctx err a. (Transaction -> Om ctx err a) -> Connection -> Om ctx err aOm-friendly transaction (takes Connection as parameter)
#txQuery Source
txQuery :: forall @a ctx err. ReadForeign a => SQL -> Array PGValue -> Transaction -> Om ctx (parseError :: MultipleErrors | err) (Array a)Transaction query and parse rows using yoga-json's ReadForeign (DEFAULT) Throws parse errors to the Om exception channel
#txQuerySimple Source
txQuerySimple :: forall ctx err. SQL -> Transaction -> Om ctx err QueryResultOm-friendly transaction querySimple (raw Foreign, takes Transaction as parameter)
Re-exports from Yoga.Postgres
#Transaction Source
data Transaction#Connection Source
data Connection