beam-sqlite-0.5.2.0: Beam driver for SQLite
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.Beam.Sqlite.Connection

Synopsis

Documentation

data Sqlite Source #

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

Instances details
BeamSqlBackend Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

BeamHasInsertOnConflict Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Associated Types

data SqlConflictTarget Sqlite table #

data SqlConflictAction Sqlite table #

Methods

insertOnConflict :: forall table (db :: (Type -> Type) -> Type) s. Beamable table => DatabaseEntity Sqlite db (TableEntity table) -> SqlInsertValues Sqlite (table (QExpr Sqlite s)) -> SqlConflictTarget Sqlite table -> SqlConflictAction Sqlite table -> SqlInsert Sqlite table #

anyConflict :: forall (table :: (Type -> Type) -> Type). SqlConflictTarget Sqlite table #

conflictingFields :: Projectible Sqlite proj => (table (QExpr Sqlite QInternal) -> proj) -> SqlConflictTarget Sqlite table #

conflictingFieldsWhere :: Projectible Sqlite proj => (table (QExpr Sqlite QInternal) -> proj) -> (forall s. table (QExpr Sqlite s) -> QExpr Sqlite s Bool) -> SqlConflictTarget Sqlite table #

onConflictDoNothing :: forall (table :: (Type -> Type) -> Type). SqlConflictAction Sqlite table #

onConflictUpdateSet :: Beamable table => (forall s. table (QField s) -> table (QExpr Sqlite s) -> QAssignment Sqlite s) -> SqlConflictAction Sqlite table #

onConflictUpdateSetWhere :: Beamable table => (forall s. table (QField s) -> table (QExpr Sqlite s) -> QAssignment Sqlite s) -> (forall s. table (QField s) -> table (QExpr Sqlite s) -> QExpr Sqlite s Bool) -> SqlConflictAction Sqlite table #

BeamBackend Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Associated Types

type BackendFromField Sqlite :: Type -> Constraint #

HasSqlInTable Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasQBuilder Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

buildSqlQuery :: forall a (db :: (Type -> Type) -> Type) s. Projectible Sqlite a => TablePrefix -> Q Sqlite db s a -> BeamSqlBackendSelectSyntax Sqlite #

BeamSqlBackendHasSerial Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

BeamMigrateOnlySqlBackend Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

MonadBeam Sqlite SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

MonadBeamInsertReturning Sqlite SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Int16 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Int32 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Int64 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Int8 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Word16 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Word32 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Word64 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Word8 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite SqlNull Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Scientific Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Null Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Day Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite UTCTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite LocalTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Integer Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Bool Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Char Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Double Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

FromBackendRow Sqlite Float Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

(TypeError (PreferExplicitSize Int Int32) :: Constraint) => FromBackendRow Sqlite Int Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

(TypeError (PreferExplicitSize Word Word32) :: Constraint) => FromBackendRow Sqlite Word Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Int16 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Int32 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Int64 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Int8 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Word16 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Word32 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Word64 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Word8 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Scientific Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite UTCTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite LocalTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite ZonedTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite String Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Integer Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Bool Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Char Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Double Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlEqualityCheck Sqlite Float Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

(TypeError (PreferExplicitSize Int Int32) :: Constraint) => HasSqlEqualityCheck Sqlite Int Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

(TypeError (PreferExplicitSize Word Word32) :: Constraint) => HasSqlEqualityCheck Sqlite Word Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Int16 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Int32 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Int64 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Int8 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Word16 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Word32 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Word64 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Word8 Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Scientific Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite UTCTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite LocalTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite ZonedTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite String Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Integer Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Bool Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Char Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Double Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasSqlQuantifiedEqualityCheck Sqlite Float Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

(TypeError (PreferExplicitSize Int Int32) :: Constraint) => HasSqlQuantifiedEqualityCheck Sqlite Int Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

(TypeError (PreferExplicitSize Word Word32) :: Constraint) => HasSqlQuantifiedEqualityCheck Sqlite Word Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasDefaultSqlDataType Sqlite ByteString Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

HasDefaultSqlDataType Sqlite LocalTime Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

BeamSqlBackendIsString Sqlite Text Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

BeamSqlBackendIsString Sqlite String Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

IsSqliteSerialIntegerType a => HasDefaultSqlDataType Sqlite (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

type BeamSqlBackendSyntax Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

newtype SqlConflictAction Sqlite table Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

newtype SqlConflictTarget Sqlite table Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

type BackendFromField Sqlite Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

newtype SqliteM a Source #

MonadBeam instance inside which SQLite queries are run. See the user guide for more information

Constructors

SqliteM 

Fields

  • runSqliteM :: ReaderT (String -> IO (), Connection) IO a

    Run an IO action with access to a SQLite connection and a debug logging function, called or each query submitted on the connection.

Instances

Instances details
MonadFail SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

fail :: String -> SqliteM a #

MonadIO SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

liftIO :: IO a -> SqliteM a #

Applicative SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

pure :: a -> SqliteM a #

(<*>) :: SqliteM (a -> b) -> SqliteM a -> SqliteM b #

liftA2 :: (a -> b -> c) -> SqliteM a -> SqliteM b -> SqliteM c #

(*>) :: SqliteM a -> SqliteM b -> SqliteM b #

(<*) :: SqliteM a -> SqliteM b -> SqliteM a #

Functor SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

fmap :: (a -> b) -> SqliteM a -> SqliteM b #

(<$) :: a -> SqliteM b -> SqliteM a #

Monad SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

(>>=) :: SqliteM a -> (a -> SqliteM b) -> SqliteM b #

(>>) :: SqliteM a -> SqliteM b -> SqliteM b #

return :: a -> SqliteM a #

MonadBeam Sqlite SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

MonadBeamInsertReturning Sqlite SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

MonadBaseControl IO SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Associated Types

type StM SqliteM a #

MonadBase IO SqliteM Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

Methods

liftBase :: IO α -> SqliteM α #

type StM SqliteM a Source # 
Instance details

Defined in Database.Beam.Sqlite.Connection

type StM SqliteM a = StM (ReaderT (String -> IO (), Connection) IO) a

sqliteUriSyntax :: c Sqlite Connection SqliteM -> BeamURIOpeners c Source #

URI syntax for use with withDbConnection. See documentation for BeamURIOpeners for more information.

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

runInsertReturningList :: (Beamable table, FromBackendRow Sqlite (table Identity)) => SqlInsert Sqlite table -> SqliteM [table Identity] Source #

Runs a SqliteInsertReturning statement and returns a result for each inserted row.