Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 :: 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.
Instances
MonadBeam
instance inside whiche SQLite queries are run. See the
user guide for more information
SqliteM | |
|
Instances
Monad SqliteM Source # | |
Functor SqliteM Source # | |
MonadFail SqliteM Source # | |
Defined in Database.Beam.Sqlite.Connection | |
Applicative SqliteM Source # | |
MonadIO SqliteM Source # | |
Defined in Database.Beam.Sqlite.Connection | |
MonadBeamInsertReturning Sqlite SqliteM Source # | |
Defined in Database.Beam.Sqlite.Connection runInsertReturningList :: (Beamable table, Projectible Sqlite (table (QExpr Sqlite ())), FromBackendRow Sqlite (table Identity)) => SqlInsert Sqlite table -> SqliteM [table Identity] # | |
MonadBeam Sqlite SqliteM Source # | |
Defined in Database.Beam.Sqlite.Connection 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) # runReturningList :: FromBackendRow Sqlite x => BeamSqlBackendSyntax Sqlite -> SqliteM [x] # |
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 :: 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