Module

Control.Monad.Postgres.Session

Package
purescript-postgresql
Repository
cakekindel/purescript-postgresql

#SessionT Source

type SessionT :: forall k. (k -> Type) -> k -> Typetype SessionT = ReaderT Client

Instances

#MonadSession Source

class MonadSession :: (Type -> Type) -> Constraintclass (MonadAff m) <= MonadSession m  where

A monad representing a connected session to a database

Members

  • query :: forall q r. AsQuery q => FromRows r => q -> m r

    Executes a query and unmarshals the result into r

  • exec :: forall q. AsQuery q => q -> m Int

    Executes a query and returns the number of rows affected

  • exec_ :: forall q. AsQuery q => q -> m Unit

    Executes a query and discards the result

Instances