-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A primitive yet easy to use sqlite library. -- -- A primitive yet easy to use sqlite library built using sqlite-direct, -- resource-pool and migrant. @package sqlite-easy @version 0.1.0.0 module Database.Sqlite.Easy.Internal -- | A SQLite3 connection string newtype ConnectionString ConnectionString :: Text -> ConnectionString [unConnectionString] :: ConnectionString -> Text -- | Create a pool of a sqlite3 db with a specific connection string. createSqlitePool :: ConnectionString -> IO (Pool Database) -- | Open a database, run some stuff, close the database. withDb :: ConnectionString -> (Database -> IO a) -> IO a -- | A SQL statement newtype SQL SQL :: Text -> SQL [unSQL] :: SQL -> Text -- | Run a SQL statement on a database and fetch the results. run :: SQL -> Database -> IO [[SQLData]] -- | Run a SQL statement with certain parameters on a database and fetch -- the results. runWith :: SQL -> [SQLData] -> Database -> IO [[SQLData]] -- | Run a statement and fetch all of the data. fetchAll :: Statement -> IO [[SQLData]] -- | Run operations as a transaction. If the action throws an error, the -- transaction is rolled back. -- -- Note: Transactions do not nest. -- -- For more information, visit: -- https://www.sqlite.org/lang_transaction.html asTransaction :: Typeable a => Database -> IO a -> IO a asTransaction' :: Database -> IO a -> IO a -- | Cancel a transaction by supplying the return value. To be used inside -- transactions. cancelTransaction :: Typeable a => a -> IO a data CancelTransaction a CancelTransaction :: a -> CancelTransaction a instance GHC.Show.Show Database.Sqlite.Easy.Internal.ConnectionString instance Data.String.IsString Database.Sqlite.Easy.Internal.ConnectionString instance GHC.Show.Show Database.Sqlite.Easy.Internal.SQL instance Data.String.IsString Database.Sqlite.Easy.Internal.SQL instance GHC.Base.Semigroup Database.Sqlite.Easy.Internal.SQL instance GHC.Show.Show (Database.Sqlite.Easy.Internal.CancelTransaction a) instance Data.Typeable.Internal.Typeable a => GHC.Exception.Type.Exception (Database.Sqlite.Easy.Internal.CancelTransaction a) module Database.Sqlite.Easy.Migrant instance Database.Migrant.Driver.Class.Driver Database.SQLite3.Direct.Database -- | Easy to use interface for SQLite3 using the direct-sqlite -- library. -- -- This can be useful for your toy, hobby projects. module Database.Sqlite.Easy -- | Open a database, run some stuff, close the database. withDb :: ConnectionString -> (Database -> IO a) -> IO a -- | A SQLite3 connection string newtype ConnectionString ConnectionString :: Text -> ConnectionString [unConnectionString] :: ConnectionString -> Text data Database data Pool a -- | Create a pool of a sqlite3 db with a specific connection string. createSqlitePool :: ConnectionString -> IO (Pool Database) withResource :: Pool a -> (a -> IO r) -> IO r destroyAllResources :: Pool a -> IO () -- | Run a SQL statement on a database and fetch the results. run :: SQL -> Database -> IO [[SQLData]] -- | Run a SQL statement with certain parameters on a database and fetch -- the results. runWith :: SQL -> [SQLData] -> Database -> IO [[SQLData]] -- | A SQL statement data SQL data SQLData SQLInteger :: !Int64 -> SQLData SQLFloat :: !Double -> SQLData SQLText :: !Text -> SQLData SQLBlob :: !ByteString -> SQLData SQLNull :: SQLData data SQLError SQLError :: !Error -> Text -> Text -> SQLError [sqlError] :: SQLError -> !Error [sqlErrorDetails] :: SQLError -> Text [sqlErrorContext] :: SQLError -> Text data ColumnType IntegerColumn :: ColumnType FloatColumn :: ColumnType TextColumn :: ColumnType BlobColumn :: ColumnType NullColumn :: ColumnType -- | Run operations as a transaction. If the action throws an error, the -- transaction is rolled back. -- -- Note: Transactions do not nest. -- -- For more information, visit: -- https://www.sqlite.org/lang_transaction.html asTransaction :: Typeable a => Database -> IO a -> IO a -- | Cancel a transaction by supplying the return value. To be used inside -- transactions. cancelTransaction :: Typeable a => a -> IO a -- | 64-bit signed integer type data Int64 -- | A space efficient, packed, unboxed Unicode text type. data Text -- | A space-efficient representation of a Word8 vector, supporting -- many efficient operations. -- -- A ByteString contains 8-bit bytes, or by using the operations -- from Data.ByteString.Char8 it can be interpreted as containing -- 8-bit characters. data ByteString