This is intended to be a low level wrapper over sqlite3 library. These design decisions guide this module:
- Portability.
- It is meant to be as close as possible to a bijection over sqlite3 objects, constants and functions. The original documentation for any sqlite3 name should be sufficient to understand its wrapper.
- Everything not UTF-8 has been removed in favor of UTF-8.
-
sqlite3_
prefix has been removed from all object and function names since it can be mapped to a qualified module import. - Mutex related names are not wrapped, as they would just duplicate existing functionality.
- All sqlite3 experimental or obsolete code (marked with
exp
orobs
in the official documentation) has not been wrapped, as well as the testing interface (sqlite3_test_control
and related constants). - Preprocessor constant definitions have been replaced by equal values. All were typed to CInt, except for SQLITE_STATIC and SQLITE_TRANSIENT (mapped to sqliteStatic and sqliteTransient) which were typed as function pointers as faithfully as possible to the underline C code. Version information constants are not mapped for portability, and the user can always call the mappings of sqlite3_libversion and sqlite3_libversion_number functions instead.
- data Sqlite3 = Sqlite3
- data Blob = Blob
- data Context = Context
- data File = File
- data Int64 = Int64
- data Uint64 = Uint64
- data IoMethods = IoMethods
- data Stmt = Stmt
- data Value = Value
- data Vfs = Vfs
- tempDirectory :: Ptr CString
- close :: Ptr Sqlite3 -> IO CInt
- exec :: Ptr Sqlite3 -> CString -> FunPtr (Ptr () -> CInt -> Ptr CString -> Ptr CString -> IO CInt) -> Ptr () -> Ptr CString -> IO CInt
- free :: Ptr a -> IO ()
- open :: CString -> Ptr (Ptr Sqlite3) -> IO CInt