Module
Droplet.Driver
- Package
- purescript-droplet
- Repository
- easafe/purescript-droplet
Functions for database access
Re-exports from Droplet.Driver.Internal.Pool
Re-exports from Droplet.Driver.Internal.Query
#PgError Source
data PgError
Constructors
ClientError Error String
ConversionError String
InternalError PGErrorDetail
OperationalError PGErrorDetail
ProgrammingError PGErrorDetail
IntegrityError PGErrorDetail
DataError PGErrorDetail
NotSupportedError PGErrorDetail
QueryCanceledError PGErrorDetail
TransactionRollbackError PGErrorDetail
TooManyRows
Instances
#PGErrorDetail Source
type PGErrorDetail = { code :: String, column :: String, constraint :: String, dataType :: String, detail :: String, error :: Error, file :: String, hint :: String, internalPosition :: String, internalQuery :: String, line :: String, message :: String, position :: String, routine :: String, schema :: String, severity :: String, table :: String, where_ :: String }
#FromResult Source
class FromResult :: RowList Type -> Type -> Constraint
class FromResult (projection :: RowList Type) result | projection -> result where
Members
Instances
FromResult Nil (Record ())
(FromValue t, FromResult rest (Record restProjection), IsSymbol name, Lacks name restProjection, Cons name t restProjection projection) => FromResult (Cons name t rest) (Record projection)
#withTransaction Source
withTransaction :: forall a. Pool -> (Connection -> Aff a) -> Aff (Either PgError a)
Runs queries within a transaction
#withConnection Source
withConnection :: forall a. Pool -> (Either PgError Connection -> Aff a) -> Aff a
Runs queries with a connection
Re-exports from Droplet.Language.Internal.Translate
- Modules
- Droplet.
Driver - Droplet.
Driver. Internal. Migration - Droplet.
Driver. Internal. Pool - Droplet.
Driver. Internal. Query - Droplet.
Driver. Migration - Droplet.
Driver. Unsafe - Droplet.
Language - Droplet.
Language. Internal. Condition - Droplet.
Language. Internal. Definition - Droplet.
Language. Internal. Function - Droplet.
Language. Internal. Syntax - Droplet.
Language. Internal. Token - Droplet.
Language. Internal. Translate
Those instances are required for testing.