-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Sqlite3 backend for the groundhog library
--
-- This package includes a thin sqlite3 wrapper based on the
-- direct-sqlite package, as well as the entire C library, so there are
-- no system dependencies.
@package groundhog-sqlite
@version 0.1.0.2
module Database.Sqlite
data Database
data Statement
type Error = Int
data StepResult
Row :: StepResult
Done :: StepResult
data SQLData
SQLInteger :: Int64 -> SQLData
SQLFloat :: Double -> SQLData
SQLText :: Text -> SQLData
SQLBlob :: ByteString -> SQLData
SQLNull :: SQLData
data ColumnType
IntegerColumn :: ColumnType
FloatColumn :: ColumnType
TextColumn :: ColumnType
BlobColumn :: ColumnType
NullColumn :: ColumnType
open :: String -> IO Database
close :: Database -> IO ()
prepare :: Database -> ByteString -> IO Statement
step :: Statement -> IO StepResult
reset :: Statement -> IO ()
finalize :: Statement -> IO ()
-- | Find the number SQL parameters in a prepared statement.
bindParameterCount :: Statement -> IO Int
-- | Return the N-th SQL parameter name.
--
-- Named parameters are returned as-is. E.g. ":v" is returned as Just
-- ":v". Unnamed parameters, however, are converted to
-- Nothing.
--
-- Note that the column index starts at 1, not 0.
bindParameterName :: Statement -> Int -> IO (Maybe String)
bindBlob :: Statement -> Int -> ByteString -> IO ()
bindDouble :: Statement -> Int -> Double -> IO ()
bindInt :: Statement -> Int -> Int -> IO ()
bindInt64 :: Statement -> Int -> Int64 -> IO ()
bindNull :: Statement -> Int -> IO ()
bindText :: Statement -> Int -> Text -> IO ()
bind :: Statement -> [SQLData] -> IO ()
column :: Statement -> Int -> IO SQLData
columns :: Statement -> IO [SQLData]
unsafeColumns :: Statement -> [Maybe ColumnType] -> IO [SQLData]
instance Typeable SQLData
instance Eq StepResult
instance Show StepResult
instance Eq ColumnType
instance Show ColumnType
instance Eq SQLData
instance Show SQLData
module Database.Groundhog.Sqlite
withSqlitePool :: (MonadBaseControl IO m, MonadIO m) => String -> Int -> (Pool Sqlite -> m a) -> m a
withSqliteConn :: (MonadBaseControl IO m, MonadIO m) => String -> (Sqlite -> m a) -> m a
runSqlitePool :: (MonadBaseControl IO m, MonadIO m) => DbPersist Sqlite m a -> Pool Sqlite -> m a
runSqliteConn :: (MonadBaseControl IO m, MonadIO m) => DbPersist Sqlite m a -> Sqlite -> m a
data Sqlite
instance Eq Affinity
instance Show Affinity
instance (MonadBaseControl IO m, MonadIO m) => PersistBackend (DbPersist Sqlite m)
instance DbDescriptor Sqlite