persistent-sqlite-2.2: Backend for the persistent library using sqlite3.

Safe HaskellNone
LanguageHaskell98

Database.Sqlite

Description

A port of the direct-sqlite package for dealing directly with PersistValues.

Synopsis

Documentation

data SqliteException

A custom exception type to make it easier to catch exceptions.

Since 2.1.3

Constructors

SqliteException 

data StepResult

Constructors

Row 
Done 

data Config

Configuration option for SQLite to be used together with the config function.

Since 2.1.4

Constructors

ConfigLogFn LogFunction

A function to be used for logging

data LogFunction

Since 2.1.4

bindInt :: Statement -> Int -> Int -> IO ()

bindInt64 :: Statement -> Int -> Int64 -> IO ()

bindNull :: Statement -> Int -> IO ()

bindText :: Statement -> Int -> Text -> IO ()

mkLogFunction :: (Int -> String -> IO ()) -> IO LogFunction

Wraps a given function to a LogFunction to be further used with ConfigLogFn. First argument of given function will take error code, second - log message. Returned value should be released with freeLogFunction when no longer required.

freeLogFunction :: LogFunction -> IO ()

Releases a native FunPtr for the LogFunction.

Since 2.1.4

config :: Config -> IO ()

Sets SQLite global configuration parameter. See SQLite documentation for the sqlite3_config function. In short, this must be called prior to any other SQLite function if you want the call to succeed.

Since 2.1.4