-- 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 0.0.0 -- | A port of the direct-sqlite package for dealing directly with -- PersistValues. module Database.Sqlite data Database -- | The MVar is only used for insuring the statement is not -- double-finalized. It won't stop you from using a statement after it's -- been finalized. 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 ErrorNotADatabase :: Error ErrorRow :: Error ErrorDone :: Error data StepResult Row :: StepResult Done :: StepResult open :: String -> IO Database close :: Database -> IO () prepare :: Database -> String -> IO Statement step :: Statement -> IO StepResult reset :: 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 -> String -> IO () bind :: Statement -> [PersistValue] -> IO () column :: Statement -> Int -> IO PersistValue columns :: Statement -> IO [PersistValue] instance Eq ColumnType instance Show ColumnType instance Eq StepResult instance Show StepResult instance Eq Error instance Show Error -- | A sqlite backend for persistent. module Database.Persist.Sqlite -- | A ReaderT monad transformer holding a sqlite database connection. type SqliteReader = ReaderT Database -- | Generate data types and instances for the given entity definitions. -- Can deal directly with the output of the persist quasi-quoter. persistSqlite :: [EntityDef] -> Q [Dec] -- | Run a series of database actions within a single transactions. On any -- exception, the transaction is rolled back. runSqlite :: (MonadCatchIO m) => SqliteReader m a -> Database -> m a -- | Handles opening and closing of the database connection automatically. withSqlite :: (MonadCatchIO m) => String -> (Database -> m a) -> m a data Database open :: String -> IO Database close :: Database -> IO () -- | 64-bit signed integer type data Int64 :: * -- | Converts a quasi-quoted syntax into a list of entity definitions, to -- be used as input to the backend-specific template haskell generation -- code. persist :: QuasiQuoter