-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Use databases with the version 3 series of the SQLite C library -- -- Please see the README on GitHub at -- https://github.com/massysett/squeather#readme @package squeather @version 0.4.2.0 module Squeather.Internal.Types -- | Errors produced by the underlying SQLite3 C library. data ErrorFlag SQLITE_ERROR :: ErrorFlag SQLITE_INTERNAL :: ErrorFlag SQLITE_PERM :: ErrorFlag SQLITE_ABORT :: ErrorFlag SQLITE_BUSY :: ErrorFlag SQLITE_LOCKED :: ErrorFlag SQLITE_NOMEM :: ErrorFlag SQLITE_READONLY :: ErrorFlag SQLITE_INTERRUPT :: ErrorFlag SQLITE_IOERR :: ErrorFlag SQLITE_CORRUPT :: ErrorFlag SQLITE_NOTFOUND :: ErrorFlag SQLITE_FULL :: ErrorFlag SQLITE_CANTOPEN :: ErrorFlag SQLITE_PROTOCOL :: ErrorFlag SQLITE_EMPTY :: ErrorFlag SQLITE_SCHEMA :: ErrorFlag SQLITE_TOOBIG :: ErrorFlag SQLITE_CONSTRAINT :: ErrorFlag SQLITE_MISMATCH :: ErrorFlag SQLITE_MISUSE :: ErrorFlag SQLITE_NOLFS :: ErrorFlag SQLITE_AUTH :: ErrorFlag SQLITE_FORMAT :: ErrorFlag SQLITE_RANGE :: ErrorFlag SQLITE_NOTADB :: ErrorFlag SQLITE_NOTICE :: ErrorFlag SQLITE_WARNING :: ErrorFlag SQLITE_ERROR_MISSING_COLLSEQ :: ErrorFlag SQLITE_ERROR_RETRY :: ErrorFlag SQLITE_ERROR_SNAPSHOT :: ErrorFlag SQLITE_IOERR_READ :: ErrorFlag SQLITE_IOERR_SHORT_READ :: ErrorFlag SQLITE_IOERR_WRITE :: ErrorFlag SQLITE_IOERR_FSYNC :: ErrorFlag SQLITE_IOERR_DIR_FSYNC :: ErrorFlag SQLITE_IOERR_TRUNCATE :: ErrorFlag SQLITE_IOERR_FSTAT :: ErrorFlag SQLITE_IOERR_UNLOCK :: ErrorFlag SQLITE_IOERR_RDLOCK :: ErrorFlag SQLITE_IOERR_DELETE :: ErrorFlag SQLITE_IOERR_BLOCKED :: ErrorFlag SQLITE_IOERR_NOMEM :: ErrorFlag SQLITE_IOERR_ACCESS :: ErrorFlag SQLITE_IOERR_CHECKRESERVEDLOCK :: ErrorFlag SQLITE_IOERR_LOCK :: ErrorFlag SQLITE_IOERR_CLOSE :: ErrorFlag SQLITE_IOERR_DIR_CLOSE :: ErrorFlag SQLITE_IOERR_SHMOPEN :: ErrorFlag SQLITE_IOERR_SHMSIZE :: ErrorFlag SQLITE_IOERR_SHMLOCK :: ErrorFlag SQLITE_IOERR_SHMMAP :: ErrorFlag SQLITE_IOERR_SEEK :: ErrorFlag SQLITE_IOERR_DELETE_NOENT :: ErrorFlag SQLITE_IOERR_MMAP :: ErrorFlag SQLITE_IOERR_GETTEMPPATH :: ErrorFlag SQLITE_IOERR_CONVPATH :: ErrorFlag SQLITE_IOERR_VNODE :: ErrorFlag SQLITE_IOERR_AUTH :: ErrorFlag SQLITE_IOERR_BEGIN_ATOMIC :: ErrorFlag SQLITE_IOERR_COMMIT_ATOMIC :: ErrorFlag SQLITE_IOERR_ROLLBACK_ATOMIC :: ErrorFlag SQLITE_LOCKED_SHAREDCACHE :: ErrorFlag SQLITE_LOCKED_VTAB :: ErrorFlag SQLITE_BUSY_RECOVERY :: ErrorFlag SQLITE_BUSY_SNAPSHOT :: ErrorFlag SQLITE_CANTOPEN_NOTEMPDIR :: ErrorFlag SQLITE_CANTOPEN_ISDIR :: ErrorFlag SQLITE_CANTOPEN_FULLPATH :: ErrorFlag SQLITE_CANTOPEN_CONVPATH :: ErrorFlag SQLITE_CANTOPEN_DIRTYWAL :: ErrorFlag SQLITE_CANTOPEN_SYMLINK :: ErrorFlag SQLITE_CORRUPT_VTAB :: ErrorFlag SQLITE_CORRUPT_SEQUENCE :: ErrorFlag SQLITE_READONLY_RECOVERY :: ErrorFlag SQLITE_READONLY_CANTLOCK :: ErrorFlag SQLITE_READONLY_ROLLBACK :: ErrorFlag SQLITE_READONLY_DBMOVED :: ErrorFlag SQLITE_READONLY_CANTINIT :: ErrorFlag SQLITE_READONLY_DIRECTORY :: ErrorFlag SQLITE_ABORT_ROLLBACK :: ErrorFlag SQLITE_CONSTRAINT_CHECK :: ErrorFlag SQLITE_CONSTRAINT_COMMITHOOK :: ErrorFlag SQLITE_CONSTRAINT_FOREIGNKEY :: ErrorFlag SQLITE_CONSTRAINT_FUNCTION :: ErrorFlag SQLITE_CONSTRAINT_NOTNULL :: ErrorFlag SQLITE_CONSTRAINT_PRIMARYKEY :: ErrorFlag SQLITE_CONSTRAINT_TRIGGER :: ErrorFlag SQLITE_CONSTRAINT_UNIQUE :: ErrorFlag SQLITE_CONSTRAINT_VTAB :: ErrorFlag SQLITE_CONSTRAINT_ROWID :: ErrorFlag SQLITE_CONSTRAINT_PINNED :: ErrorFlag SQLITE_NOTICE_RECOVER_WAL :: ErrorFlag SQLITE_NOTICE_RECOVER_ROLLBACK :: ErrorFlag SQLITE_WARNING_AUTOINDEX :: ErrorFlag SQLITE_AUTH_USER :: ErrorFlag SQLITE_OK_LOAD_PERMANENTLY :: ErrorFlag SQLITE_OK_SYMLINK :: ErrorFlag -- | Result from applying step to a Statement. data StepResult -- | A row is ready to be processed Row :: StepResult -- | There are no more rows Done :: StepResult -- | Whether to create a new database if it does not already exist. data Create Create :: Create NoCreate :: Create data WriteMode ReadOnly :: WriteMode ReadWrite :: Create -> WriteMode -- | Whether to use multi-thread mode or serialized mode, see -- -- https://www.sqlite.org/threadsafe.html -- -- It is not possible to use the SQLite single-thread mode. data ThreadMode MultiThread :: ThreadMode Serialized :: ThreadMode -- | Whether to use shared cache or private cache mode, see -- -- https://www.sqlite.org/sharedcache.html data CacheMode Shared :: CacheMode Private :: CacheMode -- | Various options when opening a database. data OpenFlags OpenFlags :: WriteMode -> Bool -> Bool -> ThreadMode -> CacheMode -> Bool -> OpenFlags [writeMode] :: OpenFlags -> WriteMode -- | Filename can be interpreted as a URI if True. [uri] :: OpenFlags -> Bool -- | Database will be opened in-memory. If you use this flag, the filename -- is ignored. [memory] :: OpenFlags -> Bool [threadMode] :: OpenFlags -> ThreadMode [cacheMode] :: OpenFlags -> CacheMode -- | If True, the database filename is not allowed to be a symbolic link. [noFollow] :: OpenFlags -> Bool instance GHC.Show.Show Squeather.Internal.Types.ErrorFlag instance GHC.Classes.Ord Squeather.Internal.Types.ErrorFlag instance GHC.Classes.Eq Squeather.Internal.Types.ErrorFlag instance GHC.Show.Show Squeather.Internal.Types.StepResult instance GHC.Classes.Ord Squeather.Internal.Types.StepResult instance GHC.Classes.Eq Squeather.Internal.Types.StepResult instance GHC.Show.Show Squeather.Internal.Types.Create instance GHC.Classes.Ord Squeather.Internal.Types.Create instance GHC.Classes.Eq Squeather.Internal.Types.Create instance GHC.Show.Show Squeather.Internal.Types.WriteMode instance GHC.Classes.Ord Squeather.Internal.Types.WriteMode instance GHC.Classes.Eq Squeather.Internal.Types.WriteMode instance GHC.Show.Show Squeather.Internal.Types.ThreadMode instance GHC.Classes.Ord Squeather.Internal.Types.ThreadMode instance GHC.Classes.Eq Squeather.Internal.Types.ThreadMode instance GHC.Show.Show Squeather.Internal.Types.CacheMode instance GHC.Classes.Ord Squeather.Internal.Types.CacheMode instance GHC.Classes.Eq Squeather.Internal.Types.CacheMode instance GHC.Show.Show Squeather.Internal.Types.OpenFlags instance GHC.Classes.Ord Squeather.Internal.Types.OpenFlags instance GHC.Classes.Eq Squeather.Internal.Types.OpenFlags module Squeather.Internal.Bindings data ParseErrorResult -- | There was no error ParseErrorOk :: ParseErrorResult -- | A StepResult was found. ParseErrorStep :: StepResult -> ParseErrorResult -- | An error code was found. ParseErrorError :: ErrorFlag -> ParseErrorResult -- | The error code was not found. ParseErrorNotFound :: ParseErrorResult parseError :: (Integral a, Show a) => a -> ParseErrorResult c'SQLITE_VERSION :: String c'SQLITE_VERSION_NUMBER :: Integral a => a c'SQLITE_SOURCE_ID :: String c'SQLITE_STATIC :: Integral a => a c'SQLITE_TRANSIENT :: Integral a => a -- | Various types of SQL data; used both when obtaining query results and -- when providing named parameters. data SQLData SQLNull :: SQLData SQLText :: Text -> SQLData SQLFloat :: Double -> SQLData SQLInteger :: Int64 -> SQLData SQLBlob :: ByteString -> SQLData flagsToInt :: OpenFlags -> CInt cacheModeToInt :: CacheMode -> CInt threadModeToInt :: ThreadMode -> CInt writeModeToInt :: WriteMode -> CInt -- | Returns a SQLData that indicates only the data type -- corresponding to the given constant. Any fields in the SQLData -- will be undefined. convertCColumnType :: Integral a => a -> Maybe SQLData instance GHC.Show.Show Squeather.Internal.Bindings.ParseErrorResult instance GHC.Classes.Ord Squeather.Internal.Bindings.ParseErrorResult instance GHC.Classes.Eq Squeather.Internal.Bindings.ParseErrorResult instance GHC.Show.Show Squeather.Internal.Bindings.SQLData instance GHC.Classes.Ord Squeather.Internal.Bindings.SQLData instance GHC.Classes.Eq Squeather.Internal.Bindings.SQLData module Squeather.Internal -- | SQLite3 database handle data C'sqlite3 -- | SQLite3 statement handle data C'sqlite3_stmt -- | Void data C'void -- | Database handle. To create a database handle, use open. The -- resources behind the handle are automatically destroyed when there are -- no remaining references to the Database, so Squeather provides -- no close function. data Database Database :: ForeignPtr C'sqlite3 -> Text -> Database [dbPointer] :: Database -> ForeignPtr C'sqlite3 -- | Used only for error messages. [dbFilename] :: Database -> Text -- | Statement handle. To create a statement handle, use prepare. -- The resources behind the Statement are automatically destroyed when -- there are no remaining references to the Statement, so -- Squeather provides no finalize function. data Statement Statement :: ForeignPtr C'sqlite3_stmt -> Text -> Database -> Statement [stmtPointer] :: Statement -> ForeignPtr C'sqlite3_stmt -- | SQL used to make the statement [stmtSql] :: Statement -> Text -- | Database used to make this statement [stmtDb] :: Statement -> Database -- | Errors produced by the Squeather library (as opposed to being caused -- directly by the underlying SQLite3 C library.) data SqueatherErrorFlag -- | Named parameter for SQL statement not found ParameterNotFound :: SqueatherErrorFlag -- | The exec function found an error string ExecFailed :: SqueatherErrorFlag -- | Failed to convert an Int to a CInt or vice-versa because -- the values were out of range. IntConversion :: SqueatherErrorFlag -- | sqlite3_column_type returned a type Squeather didn't identify. UnknownColumnType :: CInt -> SqueatherErrorFlag -- | SQLite returned an error code that is uknown to Squeather. UnknownSqliteError :: CInt -> SqueatherErrorFlag -- | A backup was started, but it did not finish running. IncompleteBackup :: SqueatherErrorFlag -- | These failures should never happen and indicate a bug in Squeather. Bug :: SqueatherErrorFlag -- | The call to sqlite3_column_name returned a null pointer. ColumnNameNull :: Int -> SqueatherErrorFlag -- | Exceptions. Squeather indicates all errors (even those arising from -- possible bugs) by throwing exceptions of this type. data Error Error :: Text -> Either ErrorFlag SqueatherErrorFlag -> Text -> Text -> Error -- | Gives a context where this error occured, such as a SELECT query or a -- filename passed to open. [errorContext] :: Error -> Text -- | Either the error flag returned by SQLite library, or the flag produced -- by this library. [errorFlag] :: Error -> Either ErrorFlag SqueatherErrorFlag -- | The text description of the error, as returned by SQLite or as created -- by Squeather. [errorText] :: Error -> Text -- | The filename of the database giving rise to the error. [errorFilename] :: Error -> Text -- | https://www.sqlite.org/c3ref/extended_result_codes.html sqlite3_extended_result_codes :: Ptr C'sqlite3 -> Int -> IO CInt -- | https://www.sqlite.org/c3ref/open.html sqlite3_open_v2 :: Ptr CChar -> Ptr (Ptr C'sqlite3) -> CInt -> Ptr CChar -> IO CInt -- | https://www.sqlite.org/c3ref/errcode.html sqlite3_errmsg :: Ptr C'sqlite3 -> IO (Ptr CChar) -- | Reads a UTF-8 text. readUtf8 :: Ptr CChar -> IO Text -- | Writes a UTF-8 text for foreign function use. writeUtf8 :: Text -> (Ptr CChar -> IO a) -> IO a -- | Like writeUtf8 but instead returns a CStringLen. writeUtf8Len :: Text -> ((Ptr CChar, Int) -> IO a) -> IO a -- | Checks SQLite return code. Throws an exception if the code is an -- error. Otherwise, returns successfully. Do not use this function if -- checking the return code from a function such as -- sqlite3_step; instead, use checkStepError. checkError :: Database -> Text -> CInt -> IO () -- | Like checkError but for use only when using -- sqlite3_initialize. checkInitError :: Text -> CInt -> IO () -- | Like checkError but for use when using sqlite3_step. checkStepError :: Database -> Text -> CInt -> IO StepResult -- | Opens a new Database. The openFlags are used. open :: Text -> IO Database -- | Opens a new Database, with settings specified with -- openFlags. openWithFlags :: OpenFlags -> Text -> IO Database -- | https://www.sqlite.org/c3ref/prepare.html sqlite3_prepare_v2 :: Ptr C'sqlite3 -> Ptr CChar -> CInt -> Ptr (Ptr C'sqlite3_stmt) -> Ptr (Ptr CChar) -> IO CInt -- | Prepares a statement. The corresponding C SQLite function allows you -- to pass in a multi-statement SQL text, and retrieve the unused portion -- for later use. Squeather does not allow this. Squeather will prepare -- only the first statement. prepare :: Database -> Text -> IO Statement -- | https://www.sqlite.org/c3ref/bind_parameter_index.html sqlite3_bind_parameter_index :: Ptr C'sqlite3_stmt -> Ptr CChar -> IO CInt -- | Gets the index of the parameter that has the given name. Throws an -- Error with ParameterNotFound if the given parameter name -- does not exist for this statement. getParameterIndex :: Statement -> Text -> IO CInt -- | https://www.sqlite.org/c3ref/bind_blob.html sqlite3_bind_blob :: Ptr C'sqlite3_stmt -> CInt -> Ptr a -> CInt -> FunPtr (Ptr a -> IO ()) -> IO CInt bindBlob :: Statement -> Text -> ByteString -> IO () -- | https://www.sqlite.org/c3ref/bind_blob.html sqlite3_bind_double :: Ptr C'sqlite3_stmt -> CInt -> Double -> IO CInt bindDouble :: Statement -> Text -> Double -> IO () -- | https://www.sqlite.org/c3ref/bind_blob.html sqlite3_bind_int64 :: Ptr C'sqlite3_stmt -> CInt -> Int64 -> IO CInt bindInt64 :: Statement -> Text -> Int64 -> IO () -- | https://www.sqlite.org/c3ref/bind_blob.html sqlite3_bind_null :: Ptr C'sqlite3_stmt -> CInt -> IO CInt bindNull :: Statement -> Text -> IO () -- | https://www.sqlite.org/c3ref/bind_blob.html sqlite3_bind_text :: Ptr C'sqlite3_stmt -> CInt -> Ptr CChar -> CInt -> FunPtr (Ptr a -> IO ()) -> IO CInt bindText :: Statement -> Text -> Text -> IO () -- | Binds a parameter with given SQL data to the given Statement. bindSqlData :: Statement -> Text -> SQLData -> IO () -- | https://www.sqlite.org/c3ref/step.html sqlite3_step :: Ptr C'sqlite3_stmt -> IO CInt -- | Evaluate a prepared statement. Returns Row if the -- Statement has returned a row of data. In that case, use -- column or columns to get individual columns or all -- columns, respectively. Returns Done if there is no data to -- retrieve. In that case, step should not be called again without -- first calling reset. step :: Statement -> IO StepResult -- | The number of columns returned by the prepared statement. Can be zero. -- However, just because this routine returns a positive number does not -- mean that data will be returned. A SELECT statement will -- always return a postive column count, but a particular query might -- return no rows. -- -- https://www.sqlite.org/c3ref/column_count.html sqlite3_column_count :: Ptr C'sqlite3_stmt -> IO CInt -- | https://www.sqlite.org/c3ref/column_blob.html sqlite3_column_bytes :: Ptr C'sqlite3_stmt -> CInt -> IO CInt -- | https://www.sqlite.org/c3ref/column_blob.html sqlite3_column_type :: Ptr C'sqlite3_stmt -> CInt -> IO CInt -- | https://www.sqlite.org/c3ref/column_blob.html sqlite3_column_blob :: Ptr C'sqlite3_stmt -> CInt -> IO (Ptr a) -- | https://www.sqlite.org/c3ref/column_blob.html sqlite3_column_double :: Ptr C'sqlite3_stmt -> CInt -> IO Double -- | https://www.sqlite.org/c3ref/column_blob.html sqlite3_column_int64 :: Ptr C'sqlite3_stmt -> CInt -> IO Int64 -- | https://www.sqlite.org/c3ref/column_blob.html sqlite3_column_text :: Ptr C'sqlite3_stmt -> CInt -> IO (Ptr CUChar) -- | Retrieves a column with a given index from the Statement. -- Assumes that step was already called and that it returned -- Row. column :: Statement -> Int -> IO SQLData -- | The number of columns that a given Statement will return. Works -- regardless of whether step has been applied or not; however, -- just because this returns a positive value does not mean that -- step will ever actually return a Row. columnCount :: Statement -> IO Int -- | Return all available columns, in order, from a Statement on -- which step returned Row. You should already have -- applied step. columns :: Statement -> IO [SQLData] -- | Retrieves all remaining rows from a Statement. Applies -- step for you for as many times as needed. allRows :: Statement -> IO [[SQLData]] -- | Bind multiple named parameters to a Statement. bindParams :: Statement -> [(Text, SQLData)] -> IO () -- | Execute a query without any parameters. Executes only one query - -- there is no need to terminate it with a semicolon, although you can. -- If you use a semicolon-separated list of queries, only the first query -- will be run. There is no way to use SQL parameters; for that you will -- need executeNamed. execute :: Database -> Text -> IO [[SQLData]] -- | Execute a query with named parameters. Executes only one query - there -- is no need to terminate it with a semicolon, although you can. If you -- use a semicolon-separated list of queries, only the first query will -- be run. executeNamed :: Database -> Text -> [(Text, SQLData)] -> IO [[SQLData]] -- | Like executeNamed but also returns the names of the columns in -- addition to the SQL results. executeNamedWithColumns :: Database -> Text -> [(Text, SQLData)] -> IO ([Text], [[SQLData]]) -- | https://www.sqlite.org/c3ref/reset.html sqlite3_reset :: Ptr C'sqlite3_stmt -> IO CInt -- | Resets a Statement so it may be re-executed. Does not clear -- bindings. In SQLite, sqlite3_reset returns an error code if the -- most recent step statement returned an error. reset does not do -- this. It does not check the error code returned by -- sqlite3_reset. reset :: Statement -> IO () -- | https://www.sqlite.org/c3ref/clear_bindings.html sqlite3_clear_bindings :: Ptr C'sqlite3_stmt -> IO CInt -- | Clears all bindings on the Statement. clearBindings :: Statement -> IO () sqlite3_finalize :: Ptr C'sqlite3_stmt -> IO CInt p_squeather_finalize :: FunPtr (Ptr C'sqlite3_stmt -> IO ()) -- | https://www.sqlite.org/c3ref/close.html sqlite3_close_v2 :: Ptr C'sqlite3 -> IO CInt p_squeather_close_v2 :: FunPtr (Ptr C'sqlite3 -> IO ()) -- | The type of the callback from sqlite3_exec. This callback is -- invoked for every row of data. type ExecCallback a = Ptr a " The fourth argument of 'sqlite3_exec' is passed through here." -> CInt " The number of columns in the result" -> Ptr (Ptr CChar) " An array of pointers to strings obtained as if from @sqlite3_column_text@" -> Ptr (Ptr CChar) " An array of pointers to strings where each entry represents the name of the corresponding result column as obtained from @sqlite3_column_name@" -> IO CInt " The function should return zero if successful. If it returns non-zero, then 'SQLITE_ABORT' will be thrown without involking the callback again and without running any more SQL statements." -- | https://www.sqlite.org/c3ref/exec.html sqlite3_exec :: Ptr C'sqlite3 -> Ptr CChar -> FunPtr (ExecCallback a) -> Ptr a -> Ptr (Ptr CChar) -> IO CInt -- | https://www.sqlite.org/c3ref/free.html sqlite3_free :: Ptr a -> IO () -- | Evaluate one or more SQL statements. There is no way to obtain the -- results; for that you will need execute or executeNamed. -- There is no way to use SQL parameters; for that you will need -- executeNamed. exec :: Database -> Text -> IO () -- | https://www.sqlite.org/c3ref/last_insert_rowid.html sqlite3_last_insert_rowid :: Ptr C'sqlite3 -> IO Int64 -- | Get the rowid of the most recent successful INSERT. lastInsertRowId :: Database -> IO Int64 -- | Convert from an Int to a CInt. Makes sure the conversion fits in the -- space allotted. Throws an exception if it doesn't fit. intToCInt :: Text -> Text -> Int -> IO CInt -- | Convert from an CInt to a Int. Makes sure the conversion fits in the -- space allotted. Throws an exception if it doesn't fit. intFromCInt :: Text -> Text -> CInt -> IO Int -- | Returns a string which is the version number for SQLite used to build -- this library. SQLite is embedded into the library, so the only way to -- change the SQLite version is to recompile the library. sqliteVersion :: String -- | Default settings for OpenFlags, where the writeMode is -- ReadWrite Create, threadMode is -- Serialized, cacheMode is Private, and all other -- flags are set to False. openFlags :: OpenFlags data C'sqlite3_backup -- | https://www.sqlite.org/c3ref/backup_finish.html sqlite3_backup_init :: Ptr C'sqlite3 -> Ptr CChar -> Ptr C'sqlite3 -> Ptr CChar -> IO (Ptr C'sqlite3_backup) -- | https://www.sqlite.org/c3ref/backup_finish.html sqlite3_backup_step :: Ptr C'sqlite3_backup -> CInt -> IO CInt -- | https://www.sqlite.org/c3ref/backup_finish.html sqlite3_backup_finish :: Ptr C'sqlite3_backup -> IO CInt -- | https://www.sqlite.org/c3ref/backup_finish.html sqlite3_backup_remaining :: Ptr C'sqlite3_backup -> IO CInt -- | https://www.sqlite.org/c3ref/backup_finish.html sqlite3_backup_pagecount :: Ptr C'sqlite3_backup -> IO CInt -- | Backup source data Source Source :: Database -> Text -> Source [sourceConnection] :: Source -> Database -- | The name for the source database. Use main for the main -- database, temp for the temporary database, or the name -- specified after the AS keyword in an ATTACH -- statement for an attached database. [sourceName] :: Source -> Text -- | Backup destination data Destination Destination :: Database -> Text -> Destination [destConnection] :: Destination -> Database -- | The name for the destination database. Use main for the main -- database, temp for the temporary database, or the name -- specified after the AS keyword in an ATTACH -- statement for an attached database. [destName] :: Destination -> Text -- | Use the SQLite backup API to copy the content of one database to -- another. Can be used to safely copy databases while they are in use, -- or to copy in-memory databases to or from persistent files. backup :: Source -> Destination -> IO () -- | https://www.sqlite.org/c3ref/changes.html sqlite3_changes :: Ptr C'sqlite3 -> IO CInt -- | Count the number of rows modified by the most recent INSERT, -- UPDATE, or DELETE statement. changes :: Database -> IO Int sqlite3_column_name :: Ptr C'sqlite3_stmt -> CInt -> IO (Ptr CChar) -- | Gets the name of a column. The name is the value of the AS -- clause if it exists, or is an undefined string otherwise. columnName :: Statement -> Int -> IO Text -- | Gets all column names, in order. columnNames :: Statement -> IO [Text] -- | Returns zero if mutexing code was omitted. sqlite3_threadsafe :: IO CInt -- | Initialize the SQLite library, see -- -- https://www.sqlite.org/c3ref/initialize.html sqlite3_initialize :: IO CInt instance GHC.Show.Show Squeather.Internal.Database instance GHC.Classes.Ord Squeather.Internal.Database instance GHC.Classes.Eq Squeather.Internal.Database instance GHC.Show.Show Squeather.Internal.Statement instance GHC.Classes.Ord Squeather.Internal.Statement instance GHC.Classes.Eq Squeather.Internal.Statement instance GHC.Show.Show Squeather.Internal.SqueatherErrorFlag instance GHC.Classes.Ord Squeather.Internal.SqueatherErrorFlag instance GHC.Classes.Eq Squeather.Internal.SqueatherErrorFlag instance GHC.Show.Show Squeather.Internal.Error instance GHC.Classes.Ord Squeather.Internal.Error instance GHC.Classes.Eq Squeather.Internal.Error instance GHC.Show.Show Squeather.Internal.Source instance GHC.Classes.Ord Squeather.Internal.Source instance GHC.Classes.Eq Squeather.Internal.Source instance GHC.Show.Show Squeather.Internal.Destination instance GHC.Classes.Ord Squeather.Internal.Destination instance GHC.Classes.Eq Squeather.Internal.Destination instance GHC.Exception.Type.Exception Squeather.Internal.Error -- | Bindings to the SQLite3 C library. This is a very simple -- library that puts a minimal number of abstractions between the user -- and the underlying C library. Some notable abstractions that do -- appear: -- --