-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Backend for the persistent library using sqlite3.
--   
--   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 persistent-sqlite
@version 1.3.0.5


-- | A port of the direct-sqlite package for dealing directly with
--   <a>PersistValue</a>s.
module Database.Sqlite
data Connection
data Statement
data Error
ErrorOK :: Error
ErrorError :: Error
ErrorInternal :: Error
ErrorPermission :: Error
ErrorAbort :: Error
ErrorBusy :: Error
ErrorLocked :: Error
ErrorNoMemory :: Error
ErrorReadOnly :: Error
ErrorInterrupt :: Error
ErrorIO :: Error
ErrorNotFound :: Error
ErrorCorrupt :: Error
ErrorFull :: Error
ErrorCan'tOpen :: Error
ErrorProtocol :: Error
ErrorEmpty :: Error
ErrorSchema :: Error
ErrorTooBig :: Error
ErrorConstraint :: Error
ErrorMismatch :: Error
ErrorMisuse :: Error
ErrorNoLargeFileSupport :: Error
ErrorAuthorization :: Error
ErrorFormat :: Error
ErrorRange :: Error
ErrorNotAConnection :: Error
ErrorRow :: Error
ErrorDone :: Error
data StepResult
Row :: StepResult
Done :: StepResult
open :: Text -> IO Connection
close :: Connection -> IO ()
prepare :: Connection -> Text -> IO Statement
step :: Statement -> IO StepResult
reset :: Connection -> Statement -> IO ()
finalize :: Statement -> IO ()
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 -> [PersistValue] -> IO ()
column :: Statement -> Int -> IO PersistValue
columns :: Statement -> IO [PersistValue]
changes :: Connection -> IO Int64
instance Eq Error
instance Show Error
instance Eq StepResult
instance Show StepResult
instance Eq ColumnType
instance Show ColumnType


-- | A sqlite backend for persistent.
module Database.Persist.Sqlite
withSqlitePool :: (MonadBaseControl IO m, MonadIO m) => Text -> Int -> (ConnectionPool -> m a) -> m a
withSqliteConn :: (MonadBaseControl IO m, MonadIO m) => Text -> (Connection -> m a) -> m a
createSqlitePool :: MonadIO m => Text -> Int -> m ConnectionPool

-- | Information required to connect to a sqlite database
data SqliteConf
SqliteConf :: Text -> Int -> SqliteConf
sqlDatabase :: SqliteConf -> Text
sqlPoolSize :: SqliteConf -> Int

-- | A convenience helper which creates a new database connection and runs
--   the given block, handling <tt>MonadResource</tt> and
--   <tt>MonadLogger</tt> requirements. Note that all log messages are
--   discarded.
--   
--   Since 1.1.4
runSqlite :: (MonadBaseControl IO m, MonadIO m) => Text -> SqlPersistT (NoLoggingT (ResourceT m)) a -> m a

-- | Wrap up a raw <a>Connection</a> as a Persistent SQL <a>Connection</a>.
--   
--   Since 1.1.5
wrapConnection :: Connection -> IO Connection
instance PersistConfig SqliteConf
