flaw-sqlite-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Data.Sqlite

Description

 
Synopsis

Documentation

sqliteDb :: Text -> IO (SqliteDb, IO ()) Source #

Open SQLite database.

sqliteExec :: SqliteDb -> Text -> IO () Source #

Execute one-time query.

sqliteStmt :: SqliteDb -> Text -> IO (SqliteStmt, IO ()) Source #

Create SQLite statement.

sqliteQuery :: SqliteStmt -> (SqliteQuery -> IO a) -> IO a Source #

Get query object from statement. Just to reset statement afterwards.

sqliteStep :: SqliteQuery -> IO Bool Source #

Perform query step. Returns True if step succeeded and there's row of data. Returns False if step succeeded, but there's no data anymore. Throws an exception otherwise.

sqliteFinalStep :: SqliteQuery -> IO () Source #

Perform query step, and check that it returned SQLITE_DONE.

sqliteTransaction :: SqliteDb -> (IO () -> IO a) -> IO a Source #

Perform SQLite transaction.

class SqliteData a where Source #

Class of data which could be used in statements.

Methods

sqliteBind :: SqliteQuery -> CInt -> a -> IO () Source #

Bind data into statement.

sqliteColumn :: SqliteQuery -> CInt -> IO a Source #

Get data from query.