Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.Beam.Sqlite.Connection
Synopsis
- data Sqlite = Sqlite
- newtype SqliteM a = SqliteM {
- runSqliteM :: ReaderT (String -> IO (), Connection) IO a
- sqliteUriSyntax :: c Sqlite Connection SqliteM -> BeamURIOpeners c
- runBeamSqlite :: Connection -> SqliteM a -> IO a
- runBeamSqliteDebug :: (String -> IO ()) -> Connection -> SqliteM a -> IO a
- insertReturning :: forall table (db :: (Type -> Type) -> Type) s. Beamable table => DatabaseEntity Sqlite db (TableEntity table) -> SqlInsertValues Sqlite (table (QExpr Sqlite s)) -> SqlInsert Sqlite table
- runInsertReturningList :: (Beamable table, FromBackendRow Sqlite (table Identity)) => SqlInsert Sqlite table -> SqliteM [table Identity]
Documentation
The SQLite backend. Used to parameterize MonadBeam
and FromBackendRow
to provide support for SQLite databases. See the documentation for
MonadBeam
and the user guide for more
information on how to use this backend.
Constructors
Sqlite |
Instances
MonadBeam
instance inside which SQLite queries are run. See the
user guide for more information
Constructors
SqliteM | |
Fields
|
Instances
MonadFail SqliteM Source # | |||||
Defined in Database.Beam.Sqlite.Connection | |||||
MonadIO SqliteM Source # | |||||
Defined in Database.Beam.Sqlite.Connection | |||||
Applicative SqliteM Source # | |||||
Functor SqliteM Source # | |||||
Monad SqliteM Source # | |||||
MonadBeam Sqlite SqliteM Source # | |||||
Defined in Database.Beam.Sqlite.Connection Methods runReturningMany :: FromBackendRow Sqlite x => BeamSqlBackendSyntax Sqlite -> (SqliteM (Maybe x) -> SqliteM a) -> SqliteM a # runNoReturn :: BeamSqlBackendSyntax Sqlite -> SqliteM () # runReturningOne :: FromBackendRow Sqlite x => BeamSqlBackendSyntax Sqlite -> SqliteM (Maybe x) # runReturningFirst :: FromBackendRow Sqlite x => BeamSqlBackendSyntax Sqlite -> SqliteM (Maybe x) # runReturningList :: FromBackendRow Sqlite x => BeamSqlBackendSyntax Sqlite -> SqliteM [x] # | |||||
MonadBeamInsertReturning Sqlite SqliteM Source # | |||||
Defined in Database.Beam.Sqlite.Connection Methods runInsertReturningList :: (Beamable table, Projectible Sqlite (table (QExpr Sqlite ())), FromBackendRow Sqlite (table Identity)) => SqlInsert Sqlite table -> SqliteM [table Identity] # | |||||
MonadBaseControl IO SqliteM Source # | |||||
Defined in Database.Beam.Sqlite.Connection Associated Types
| |||||
MonadBase IO SqliteM Source # | |||||
Defined in Database.Beam.Sqlite.Connection | |||||
type StM SqliteM a Source # | |||||
Defined in Database.Beam.Sqlite.Connection |
sqliteUriSyntax :: c Sqlite Connection SqliteM -> BeamURIOpeners c Source #
URI syntax for use with withDbConnection
. See documentation for
BeamURIOpeners
for more information.
runBeamSqlite :: Connection -> SqliteM a -> IO a Source #
runBeamSqliteDebug :: (String -> IO ()) -> Connection -> SqliteM a -> IO a Source #
Emulated INSERT RETURNING
support
insertReturning :: forall table (db :: (Type -> Type) -> Type) s. Beamable table => DatabaseEntity Sqlite db (TableEntity table) -> SqlInsertValues Sqlite (table (QExpr Sqlite s)) -> SqlInsert Sqlite table Source #
Build a SqliteInsertReturning
representing inserting the given values
into the given table. Use runInsertReturningList