Module
Yoga.Postgres.PostgresOm
- Package
- purescript-yoga-postgres-om
- Repository
- rowtype-yoga/purescript-yoga-postgres-om
#query Source
query :: forall @a r err. ReadForeign a => SQL -> Array PGValue -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array a)Query and parse rows using yoga-json's ReadForeign (DEFAULT) Automatically gets Connection from Om context Throws parse errors to the Om exception channel
#queryOne Source
queryOne :: forall @a r err. ReadForeign a => SQL -> Array PGValue -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe a)Query one row and parse using yoga-json's ReadForeign (DEFAULT) Automatically gets Connection from Om context Throws parse errors to the Om exception channel
#queryUnsafe Source
queryUnsafe :: forall @a r err. SQL -> Array PGValue -> Om { postgresConnection :: Connection | r } err (Array a)Query and unsafeCoerce rows to the desired type (bypasses yoga-json parsing) Automatically gets Connection from Om context USE WITH CAUTION - no runtime validation!
#queryOneUnsafe Source
queryOneUnsafe :: forall @a r err. SQL -> Array PGValue -> Om { postgresConnection :: Connection | r } err (Maybe a)Query one row and unsafeCoerce to the desired type (bypasses yoga-json parsing) Automatically gets Connection from Om context USE WITH CAUTION - no runtime validation!
#executeSimple Source
executeSimple :: forall r err. SQL -> Om { postgresConnection :: Connection | r } err Int#begin Source
begin :: forall r err. Om { postgresConnection :: Connection | r } err Transaction