-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | SQlite driver for HDBI -- -- SQlite driver for HDBI @package hdbi-sqlite @version 1.1.1 module Database.HDBI.SQlite.Implementation -- | Connection to the database data SQliteConnection SQliteConnection :: MVar (Maybe Database) -> Text -> ChildList SQliteStatement -> SQliteConnection scDatabase :: SQliteConnection -> MVar (Maybe Database) scConnString :: SQliteConnection -> Text -- | List of statements to finish before disconnect scStatements :: SQliteConnection -> ChildList SQliteStatement -- | Prepared statement data SQliteStatement SQliteStatement :: MVar SQState -> SQliteConnection -> Query -> SQliteStatement ssState :: SQliteStatement -> MVar SQState ssConnection :: SQliteStatement -> SQliteConnection ssQuery :: SQliteStatement -> Query -- | Internal state of the statement. There is two similar constructors -- SQFetching and SQExecuted to simulate proper behaviour -- according to tests. data SQState SQNew :: Statement -> SQState sqStatement :: SQState -> Statement SQExecuted :: Statement -> StepResult -> SQState sqStatement :: SQState -> Statement sqResult :: SQState -> StepResult SQFetching :: Statement -> StepResult -> SQState sqStatement :: SQState -> Statement sqResult :: SQState -> StepResult SQFinished :: SQState -- | Connect to SQlite3 database connectSqlite3 :: Text -> IO SQliteConnection encodeUTF8 :: Text -> Utf8 encodeLUTF8 :: Text -> Utf8 encodeSUTF8 :: String -> Utf8 decodeUTF8 :: Utf8 -> Text decodeLUTF8 :: Utf8 -> Text -- | fetch value from particular column of current row in particular -- statement fetchValue :: Statement -> ColumnIndex -> IO SqlValue -- | bind SqlValue to the particular parameter of query of particular -- statement. bindParam :: Database -> Statement -> ParamIndex -> SqlValue -> IO () -- | Get error description from the database and throw exception with it. throwErrMsg :: Database -> String -> IO a -- | prepend package name to the string for error reporting sqliteMsg :: String -> String -- | Get internal Database from the SQliteConnection and -- execute and action with it. Or throw an error if connection is already -- closed. withConnectionUnlocked :: SQliteConnection -> (Database -> IO a) -> IO a instance Typeable SQliteStatement instance Typeable SQliteConnection instance Statement SQliteStatement instance Connection SQliteConnection module Database.HDBI.SQlite -- | Connection to the database data SQliteConnection SQliteConnection :: MVar (Maybe Database) -> Text -> ChildList SQliteStatement -> SQliteConnection scDatabase :: SQliteConnection -> MVar (Maybe Database) scConnString :: SQliteConnection -> Text -- | List of statements to finish before disconnect scStatements :: SQliteConnection -> ChildList SQliteStatement -- | Prepared statement data SQliteStatement SQliteStatement :: MVar SQState -> SQliteConnection -> Query -> SQliteStatement ssState :: SQliteStatement -> MVar SQState ssConnection :: SQliteStatement -> SQliteConnection ssQuery :: SQliteStatement -> Query -- | Internal state of the statement. There is two similar constructors -- SQFetching and SQExecuted to simulate proper behaviour -- according to tests. data SQState SQNew :: Statement -> SQState sqStatement :: SQState -> Statement SQExecuted :: Statement -> StepResult -> SQState sqStatement :: SQState -> Statement sqResult :: SQState -> StepResult SQFetching :: Statement -> StepResult -> SQState sqStatement :: SQState -> Statement sqResult :: SQState -> StepResult SQFinished :: SQState -- | Connect to SQlite3 database connectSqlite3 :: Text -> IO SQliteConnection