Database.SQLite3.Bindings.Types

direct-sqlite-2.3.29: Low-level binding to SQLite3. Includes UTF8 and BLOB support.

Safe Haskell | None
Language | Haskell2010

Database.SQLite3.Bindings.Types

Contents

- Objects
- Enumerations
  - Error
  - ColumnType
- Indices
  - Indices (FFI)
- Miscellaneous
- Custom functions
- Conversion to and from FFI types

Synopsis

- data CDatabase
- data CStatement
- data CValue
- data CContext
- data CBlob
- data CBackup
- newtype CError = CError CInt
- decodeError :: CError -> Error
- encodeError :: Error -> CError
- data Error
  - = ErrorOK
  - | ErrorError
  - | ErrorInternal
  - | ErrorPermission
  - | ErrorAbort
  - | ErrorBusy
  - | ErrorLocked
  - | ErrorNoMemory
  - | ErrorReadOnly
  - | ErrorInterrupt
  - | ErrorIO
  - | ErrorCorrupt
  - | ErrorNotFound
  - | ErrorFull
  - | ErrorCan'tOpen
  - | ErrorProtocol
  - | ErrorEmpty
  - | ErrorSchema
  - | ErrorTooBig
  - | ErrorConstraint
  - | ErrorMismatch
  - | ErrorMisuse
  - | ErrorNoLargeFileSupport
  - | ErrorAuthorization
  - | ErrorFormat
  - | ErrorRange
  - | ErrorNotADatabase
  - | ErrorNotice
  - | ErrorWarning
  - | ErrorRow
  - | ErrorDone
  - | ErrorErrorMissingCollatingSquence
  - | ErrorErrorRetry
  - | ErrorErrorSnapshot
  - | ErrorIORead
  - | ErrorIOShortRead
  - | ErrorIOWrite
  - | ErrorIOFsync
  - | ErrorIODirectoryFsync
  - | ErrorIOTruncate
  - | ErrorIOFstat
  - | ErrorIOUnlock
  - | ErrorIOReadLock
  - | ErrorIOBlocked
  - | ErrorIODelete
  - | ErrorIONoMemory
  - | ErrorIOAccess
  - | ErrorIOCheckReservedLock
  - | ErrorIOLock
  - | ErrorIOClose
  - | ErrorIODirectoryClose
  - | ErrorIOShmOpen
  - | ErrorIOShmSize
  - | ErrorIOShmLock
  - | ErrorIOShmMap
  - | ErrorIOSeek
  - | ErrorIODeleteNoEntity
  - | ErrorIOMmap
  - | ErrorIOGetTempPath
  - | ErrorIOConvertedPath
  - | ErrorIOVNode
  - | ErrorIOAuth
  - | ErrorIOBeginAtomic
  - | ErrorIOCommitAtomic
  - | ErrorIORollbackAtomic
  - | ErrorIOData
  - | ErrorIOCorruptFilesystem
  - | ErrorLockedSharedCache
  - | ErrorLockedVirtualTable
  - | ErrorBusyRecovery
  - | ErrorBusySnapshot
  - | ErrorBusyTimeout
  - | ErrorCan'tOpenNotTempDirectory
  - | ErrorCan'tOpenIsDirectory
  - | ErrorCan'tOpenFullPath
  - | ErrorCan'tOpenConvertedPath
  - | ErrorCan'tOpenDirtyWriteAheadLog
  - | ErrorCan'tOpenSymlink
  - | ErrorCorruptVirtualTable
  - | ErrorCorruptSequence
  - | ErrorCorruptIndex
  - | ErrorReadOnlyRecovery
  - | ErrorReadOnlyCan'tLock
  - | ErrorReadOnlyRollback
  - | ErrorReadOnlyDatabaseMoved
  - | ErrorReadOnlyCan'tInit
  - | ErrorReadOnlyDirectory
  - | ErrorAbortRollback
  - | ErrorConstraintCheck
  - | ErrorConstraintCommitHook
  - | ErrorConstraintForeignKey
  - | ErrorConstraintFunction
  - | ErrorConstraintNotNull
  - | ErrorConstraintPrimaryKey
  - | ErrorConstraintTrigger
  - | ErrorConstraintUnique
  - | ErrorConstraintVirtualTable
  - | ErrorConstraintRowId
  - | ErrorConstraintPinned
  - | ErrorConstraintDataType
  - | ErrorNoticeRecoverWriteAheadLog
  - | ErrorNoticeRecoverRollback
  - | ErrorWarningAutoIndex
  - | ErrorAuthUser
  - | ErrorOkLoadPermanently
- newtype CColumnType = CColumnType CInt
- decodeColumnType :: CColumnType -> ColumnType
- encodeColumnType :: ColumnType -> CColumnType
- data ColumnType
  - = IntegerColumn
  - | FloatColumn
  - | TextColumn
  - | BlobColumn
  - | NullColumn
- newtype ParamIndex = ParamIndex Int
- newtype ColumnIndex = ColumnIndex Int
- type ColumnCount = ColumnIndex
- newtype CParamIndex = CParamIndex CInt
- newtype CColumnIndex = CColumnIndex CInt
- type CColumnCount = CColumnIndex
- newtype CNumBytes = CNumBytes CInt
- data CDestructor
- c_SQLITE_STATIC :: Ptr CDestructor
- c_SQLITE_TRANSIENT :: Ptr CDestructor
- c_SQLITE_UTF8 :: CInt
- newtype ArgCount = ArgCount Int
- type ArgIndex = ArgCount
- newtype CArgCount = CArgCount CInt
- c_SQLITE_DETERMINISTIC :: CInt
- class FFIType public ffi | public -> ffi, ffi -> public where
  - toFFI :: public -> ffi
  - fromFFI :: ffi -> public

# Objects

https://www.sqlite.org/c3ref/objlist.html

data CDatabase #

https://www.sqlite.org/c3ref/sqlite3.html

`CDatabase` = `sqlite3`

data CStatement #

https://www.sqlite.org/c3ref/stmt.html

`CStatement` = `sqlite3_stmt`

data CValue #

https://www.sqlite.org/c3ref/value.html

`CValue` = `sqlite3_value`

data CContext #

https://www.sqlite.org/c3ref/context.html

`CContext` = `sqlite3_context`

data CBlob #

https://www.sqlite.org/c3ref/blob.html

`CBlob` = `sqlite3_blob`

data CBackup #

https://www.sqlite.org/c3ref/backup.html

`CBackup` = `sqlite3_backup`

# Enumerations

## Error

newtype CError #

https://www.sqlite.org/c3ref/c_abort.html

Constructors

CError CInt |

#### Instances

Instances details

Show CError # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> CError -> ShowS # show :: CError -> String # showList :: [CError] -> ShowS #
Eq CError # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: CError -> CError -> Bool # (/=) :: CError -> CError -> Bool #
FFIType Error CError # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: Error -> CError # fromFFI :: CError -> Error #

decodeError :: CError -> Error #

Note that this is a partial function. If the error code is invalid, or perhaps introduced in a newer version of SQLite but this library has not been updated to support it, the result is undefined.

To be clear, if `decodeError` fails, it is undefined behavior, not an exception you can handle.

Therefore, do not use direct-sqlite with a different version of SQLite than the one bundled (currently, 3.24.0). If you do, ensure that `decodeError` and `decodeColumnType` are still exhaustive.

encodeError :: Error -> CError #

data Error #

https://www.sqlite.org/c3ref/c_abort.html https://www.sqlite.org/c3ref/c_abort_rollback.html

Constructors

ErrorOK | Successful result
ErrorError | SQL error or missing database
ErrorInternal | Internal logic error in SQLite
ErrorPermission | Access permission denied
ErrorAbort | Callback routine requested an abort
ErrorBusy | The database file is locked
ErrorLocked | A table in the database is locked
ErrorNoMemory | A `malloc()` failed
ErrorReadOnly | Attempt to write a readonly database
ErrorInterrupt | Operation terminated by `sqlite3_interrupt()`
ErrorIO | Some kind of disk I/O error occurred
ErrorCorrupt | The database disk image is malformed
ErrorNotFound | Unknown opcode in `sqlite3_file_control()`
ErrorFull | Insertion failed because database is full
ErrorCan'tOpen | Unable to open the database file
ErrorProtocol | Database lock protocol error
ErrorEmpty | Database is empty
ErrorSchema | The database schema changed
ErrorTooBig | String or BLOB exceeds size limit
ErrorConstraint | Abort due to constraint violation
ErrorMismatch | Data type mismatch
ErrorMisuse | Library used incorrectly
ErrorNoLargeFileSupport | Uses OS features not supported on host
ErrorAuthorization | Authorization denied
ErrorFormat | Auxiliary database format error
ErrorRange | 2nd parameter to sqlite3_bind out of range
ErrorNotADatabase | File opened that is not a database file
ErrorNotice | Notifications from sqlite3_log()
ErrorWarning | Warnings from sqlite3_log()
ErrorRow | `sqlite3_step()` has another row ready
ErrorDone | `sqlite3_step()` has finished executing
ErrorErrorMissingCollatingSquence |
ErrorErrorRetry |
ErrorErrorSnapshot |
ErrorIORead |
ErrorIOShortRead |
ErrorIOWrite |
ErrorIOFsync |
ErrorIODirectoryFsync |
ErrorIOTruncate |
ErrorIOFstat |
ErrorIOUnlock |
ErrorIOReadLock |
ErrorIOBlocked |
ErrorIODelete |
ErrorIONoMemory |
ErrorIOAccess |
ErrorIOCheckReservedLock |
ErrorIOLock |
ErrorIOClose |
ErrorIODirectoryClose |
ErrorIOShmOpen |
ErrorIOShmSize |
ErrorIOShmLock |
ErrorIOShmMap |
ErrorIOSeek |
ErrorIODeleteNoEntity |
ErrorIOMmap |
ErrorIOGetTempPath |
ErrorIOConvertedPath |
ErrorIOVNode |
ErrorIOAuth |
ErrorIOBeginAtomic |
ErrorIOCommitAtomic |
ErrorIORollbackAtomic |
ErrorIOData |
ErrorIOCorruptFilesystem |
ErrorLockedSharedCache |
ErrorLockedVirtualTable |
ErrorBusyRecovery |
ErrorBusySnapshot |
ErrorBusyTimeout |
ErrorCan'tOpenNotTempDirectory |
ErrorCan'tOpenIsDirectory |
ErrorCan'tOpenFullPath |
ErrorCan'tOpenConvertedPath |
ErrorCan'tOpenDirtyWriteAheadLog |
ErrorCan'tOpenSymlink |
ErrorCorruptVirtualTable |
ErrorCorruptSequence |
ErrorCorruptIndex |
ErrorReadOnlyRecovery |
ErrorReadOnlyCan'tLock |
ErrorReadOnlyRollback |
ErrorReadOnlyDatabaseMoved |
ErrorReadOnlyCan'tInit |
ErrorReadOnlyDirectory |
ErrorAbortRollback |
ErrorConstraintCheck |
ErrorConstraintCommitHook |
ErrorConstraintForeignKey |
ErrorConstraintFunction |
ErrorConstraintNotNull |
ErrorConstraintPrimaryKey |
ErrorConstraintTrigger |
ErrorConstraintUnique |
ErrorConstraintVirtualTable |
ErrorConstraintRowId |
ErrorConstraintPinned |
ErrorConstraintDataType |
ErrorNoticeRecoverWriteAheadLog |
ErrorNoticeRecoverRollback |
ErrorWarningAutoIndex |
ErrorAuthUser |
ErrorOkLoadPermanently |

#### Instances

Instances details

Generic Error # |
Instance details Defined in Database.SQLite3.Bindings.Types Associated Types
type Rep Error |
Instance details Defined in Database.SQLite3.Bindings.Types type Rep Error = D1 ('MetaData "Error" "Database.SQLite3.Bindings.Types" "direct-sqlite-2.3.29-3eK4nw71xlG3w1cx1KDDCb" 'False) ((((((C1 ('MetaCons "ErrorOK" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorInternal" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorPermission" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorAbort" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorBusy" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorLocked" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorNoMemory" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorReadOnly" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorInterrupt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorCorrupt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorNotFound" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorFull" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorCan'tOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorProtocol" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorSchema" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorTooBig" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorConstraint" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorMismatch" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorMisuse" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorNoLargeFileSupport" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorAuthorization" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorFormat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorRange" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ErrorNotADatabase" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorNotice" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorWarning" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorRow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorDone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorErrorMissingCollatingSquence" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorErrorRetry" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorErrorSnapshot" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIORead" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorIOShortRead" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOWrite" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorIOFsync" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIODirectoryFsync" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorIOTruncate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOFstat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOUnlock" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorIOReadLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOBlocked" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIODelete" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorIONoMemory" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOAccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOCheckReservedLock" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorIOLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOClose" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorIODirectoryClose" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOShmOpen" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "ErrorIOShmSize" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOShmLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOShmMap" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorIOSeek" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIODeleteNoEntity" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOMmap" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorIOGetTempPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOConvertedPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOVNode" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorIOAuth" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOBeginAtomic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorIOCommitAtomic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIORollbackAtomic" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorIOData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOCorruptFilesystem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorLockedSharedCache" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorLockedVirtualTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorBusyRecovery" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorBusySnapshot" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorBusyTimeout" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorCan'tOpenNotTempDirectory" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCan'tOpenIsDirectory" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorCan'tOpenFullPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCan'tOpenConvertedPath" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorCan'tOpenDirtyWriteAheadLog" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCan'tOpenSymlink" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ErrorCorruptVirtualTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorCorruptSequence" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCorruptIndex" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorReadOnlyRecovery" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorReadOnlyCan'tLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorReadOnlyRollback" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorReadOnlyDatabaseMoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorReadOnlyCan'tInit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorReadOnlyDirectory" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorAbortRollback" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintCheck" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorConstraintCommitHook" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintForeignKey" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorConstraintFunction" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorConstraintNotNull" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintPrimaryKey" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorConstraintTrigger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintUnique" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorConstraintVirtualTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintRowId" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorConstraintPinned" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorConstraintDataType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorNoticeRecoverWriteAheadLog" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorNoticeRecoverRollback" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorWarningAutoIndex" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorAuthUser" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorOkLoadPermanently" 'PrefixI 'False) (U1 :: Type -> Type))))))))
Methods from :: Error -> Rep Error x # to :: Rep Error x -> Error #
Show Error # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> Error -> ShowS # show :: Error -> String # showList :: [Error] -> ShowS #
Eq Error # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: Error -> Error -> Bool # (/=) :: Error -> Error -> Bool #
FFIType Error CError # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: Error -> CError # fromFFI :: CError -> Error #
type Rep Error # |
Instance details Defined in Database.SQLite3.Bindings.Types type Rep Error = D1 ('MetaData "Error" "Database.SQLite3.Bindings.Types" "direct-sqlite-2.3.29-3eK4nw71xlG3w1cx1KDDCb" 'False) ((((((C1 ('MetaCons "ErrorOK" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorInternal" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorPermission" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorAbort" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorBusy" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorLocked" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorNoMemory" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorReadOnly" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorInterrupt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorCorrupt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorNotFound" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorFull" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorCan'tOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorProtocol" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorSchema" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorTooBig" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorConstraint" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorMismatch" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorMisuse" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorNoLargeFileSupport" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorAuthorization" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorFormat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorRange" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ErrorNotADatabase" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorNotice" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorWarning" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorRow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorDone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorErrorMissingCollatingSquence" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorErrorRetry" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorErrorSnapshot" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIORead" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorIOShortRead" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOWrite" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorIOFsync" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIODirectoryFsync" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorIOTruncate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOFstat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOUnlock" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorIOReadLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOBlocked" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIODelete" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorIONoMemory" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOAccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOCheckReservedLock" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorIOLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOClose" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorIODirectoryClose" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOShmOpen" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "ErrorIOShmSize" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOShmLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOShmMap" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorIOSeek" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIODeleteNoEntity" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOMmap" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorIOGetTempPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOConvertedPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOVNode" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorIOAuth" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIOBeginAtomic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorIOCommitAtomic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorIORollbackAtomic" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorIOData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorIOCorruptFilesystem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorLockedSharedCache" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorLockedVirtualTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorBusyRecovery" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorBusySnapshot" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorBusyTimeout" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorCan'tOpenNotTempDirectory" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCan'tOpenIsDirectory" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorCan'tOpenFullPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCan'tOpenConvertedPath" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorCan'tOpenDirtyWriteAheadLog" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCan'tOpenSymlink" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ErrorCorruptVirtualTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorCorruptSequence" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorCorruptIndex" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ErrorReadOnlyRecovery" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorReadOnlyCan'tLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorReadOnlyRollback" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorReadOnlyDatabaseMoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorReadOnlyCan'tInit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorReadOnlyDirectory" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorAbortRollback" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintCheck" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorConstraintCommitHook" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintForeignKey" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ErrorConstraintFunction" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorConstraintNotNull" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintPrimaryKey" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorConstraintTrigger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintUnique" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorConstraintVirtualTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorConstraintRowId" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ErrorConstraintPinned" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ErrorConstraintDataType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorNoticeRecoverWriteAheadLog" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorNoticeRecoverRollback" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorWarningAutoIndex" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorAuthUser" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorOkLoadPermanently" 'PrefixI 'False) (U1 :: Type -> Type))))))))

## ColumnType

newtype CColumnType #

https://www.sqlite.org/c3ref/c_blob.html

Constructors

CColumnType CInt |

#### Instances

Instances details

Show CColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> CColumnType -> ShowS # show :: CColumnType -> String # showList :: [CColumnType] -> ShowS #
Eq CColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: CColumnType -> CColumnType -> Bool # (/=) :: CColumnType -> CColumnType -> Bool #
FFIType ColumnType CColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ColumnType -> CColumnType # fromFFI :: CColumnType -> ColumnType #

decodeColumnType :: CColumnType -> ColumnType #

Note that this is a partial function. See `decodeError` for more information.

encodeColumnType :: ColumnType -> CColumnType #

data ColumnType #

https://www.sqlite.org/c3ref/c_blob.html

Constructors

IntegerColumn |
FloatColumn |
TextColumn |
BlobColumn |
NullColumn |

#### Instances

Instances details

Show ColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> ColumnType -> ShowS # show :: ColumnType -> String # showList :: [ColumnType] -> ShowS #
Eq ColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: ColumnType -> ColumnType -> Bool # (/=) :: ColumnType -> ColumnType -> Bool #
FFIType ColumnType CColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ColumnType -> CColumnType # fromFFI :: CColumnType -> ColumnType #

# Indices

newtype ParamIndex #

Index of a parameter in a parameterized query. Parameter indices start from 1.

When a query is `prepare`d, SQLite allocates an array indexed from 1 to the highest parameter index. For example:

    >Right stmt <- prepare conn "SELECT ?1, ?5, ?3, ?"
    >bindParameterCount stmt
    ParamIndex 6

This will allocate an array indexed from 1 to 6 (`?` takes the highest preceding index plus one). The array is initialized with null values. When you bind a parameter with `bindSQLData`, it assigns a new value to one of these indices.

See https://www.sqlite.org/lang_expr.html#varparam for the syntax of parameter placeholders, and how parameter indices are assigned.

Constructors

ParamIndex Int |

#### Instances

Instances details

Bounded ParamIndex # | Limit min/max bounds to fit into SQLite's native parameter ranges.
Instance details Defined in Database.SQLite3.Bindings.Types Methods minBound :: ParamIndex # maxBound :: ParamIndex #
Enum ParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: ParamIndex -> ParamIndex # pred :: ParamIndex -> ParamIndex # toEnum :: Int -> ParamIndex # fromEnum :: ParamIndex -> Int # enumFrom :: ParamIndex -> [ParamIndex] # enumFromThen :: ParamIndex -> ParamIndex -> [ParamIndex] # enumFromTo :: ParamIndex -> ParamIndex -> [ParamIndex] # enumFromThenTo :: ParamIndex -> ParamIndex -> ParamIndex -> [ParamIndex] #
Num ParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: ParamIndex -> ParamIndex -> ParamIndex # (-) :: ParamIndex -> ParamIndex -> ParamIndex # (*) :: ParamIndex -> ParamIndex -> ParamIndex # negate :: ParamIndex -> ParamIndex # abs :: ParamIndex -> ParamIndex # signum :: ParamIndex -> ParamIndex # fromInteger :: Integer -> ParamIndex #
Integral ParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: ParamIndex -> ParamIndex -> ParamIndex # rem :: ParamIndex -> ParamIndex -> ParamIndex # div :: ParamIndex -> ParamIndex -> ParamIndex # mod :: ParamIndex -> ParamIndex -> ParamIndex # quotRem :: ParamIndex -> ParamIndex -> (ParamIndex, ParamIndex) # divMod :: ParamIndex -> ParamIndex -> (ParamIndex, ParamIndex) # toInteger :: ParamIndex -> Integer #
Real ParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: ParamIndex -> Rational #
Show ParamIndex # | This just shows the underlying integer, without the data constructor.
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> ParamIndex -> ShowS # show :: ParamIndex -> String # showList :: [ParamIndex] -> ShowS #
Eq ParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: ParamIndex -> ParamIndex -> Bool # (/=) :: ParamIndex -> ParamIndex -> Bool #
Ord ParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: ParamIndex -> ParamIndex -> Ordering # (<) :: ParamIndex -> ParamIndex -> Bool # (<=) :: ParamIndex -> ParamIndex -> Bool # (>) :: ParamIndex -> ParamIndex -> Bool # (>=) :: ParamIndex -> ParamIndex -> Bool # max :: ParamIndex -> ParamIndex -> ParamIndex # min :: ParamIndex -> ParamIndex -> ParamIndex #
FFIType ParamIndex CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ParamIndex -> CParamIndex # fromFFI :: CParamIndex -> ParamIndex #

newtype ColumnIndex #

Index of a column in a result set. Column indices start from 0.

Constructors

ColumnIndex Int |

#### Instances

Instances details

Bounded ColumnIndex # | Limit min/max bounds to fit into SQLite's native parameter ranges.
Instance details Defined in Database.SQLite3.Bindings.Types Methods minBound :: ColumnIndex # maxBound :: ColumnIndex #
Enum ColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: ColumnIndex -> ColumnIndex # pred :: ColumnIndex -> ColumnIndex # toEnum :: Int -> ColumnIndex # fromEnum :: ColumnIndex -> Int # enumFrom :: ColumnIndex -> [ColumnIndex] # enumFromThen :: ColumnIndex -> ColumnIndex -> [ColumnIndex] # enumFromTo :: ColumnIndex -> ColumnIndex -> [ColumnIndex] # enumFromThenTo :: ColumnIndex -> ColumnIndex -> ColumnIndex -> [ColumnIndex] #
Num ColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: ColumnIndex -> ColumnIndex -> ColumnIndex # (-) :: ColumnIndex -> ColumnIndex -> ColumnIndex # (*) :: ColumnIndex -> ColumnIndex -> ColumnIndex # negate :: ColumnIndex -> ColumnIndex # abs :: ColumnIndex -> ColumnIndex # signum :: ColumnIndex -> ColumnIndex # fromInteger :: Integer -> ColumnIndex #
Integral ColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: ColumnIndex -> ColumnIndex -> ColumnIndex # rem :: ColumnIndex -> ColumnIndex -> ColumnIndex # div :: ColumnIndex -> ColumnIndex -> ColumnIndex # mod :: ColumnIndex -> ColumnIndex -> ColumnIndex # quotRem :: ColumnIndex -> ColumnIndex -> (ColumnIndex, ColumnIndex) # divMod :: ColumnIndex -> ColumnIndex -> (ColumnIndex, ColumnIndex) # toInteger :: ColumnIndex -> Integer #
Real ColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: ColumnIndex -> Rational #
Show ColumnIndex # | This just shows the underlying integer, without the data constructor.
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> ColumnIndex -> ShowS # show :: ColumnIndex -> String # showList :: [ColumnIndex] -> ShowS #
Eq ColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: ColumnIndex -> ColumnIndex -> Bool # (/=) :: ColumnIndex -> ColumnIndex -> Bool #
Ord ColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: ColumnIndex -> ColumnIndex -> Ordering # (<) :: ColumnIndex -> ColumnIndex -> Bool # (<=) :: ColumnIndex -> ColumnIndex -> Bool # (>) :: ColumnIndex -> ColumnIndex -> Bool # (>=) :: ColumnIndex -> ColumnIndex -> Bool # max :: ColumnIndex -> ColumnIndex -> ColumnIndex # min :: ColumnIndex -> ColumnIndex -> ColumnIndex #
FFIType ColumnIndex CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ColumnIndex -> CColumnIndex # fromFFI :: CColumnIndex -> ColumnIndex #

type ColumnCount = ColumnIndex #

Number of columns in a result set.

## Indices (FFI)

newtype CParamIndex #

Constructors

CParamIndex CInt |

#### Instances

Instances details

Enum CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: CParamIndex -> CParamIndex # pred :: CParamIndex -> CParamIndex # toEnum :: Int -> CParamIndex # fromEnum :: CParamIndex -> Int # enumFrom :: CParamIndex -> [CParamIndex] # enumFromThen :: CParamIndex -> CParamIndex -> [CParamIndex] # enumFromTo :: CParamIndex -> CParamIndex -> [CParamIndex] # enumFromThenTo :: CParamIndex -> CParamIndex -> CParamIndex -> [CParamIndex] #
Num CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: CParamIndex -> CParamIndex -> CParamIndex # (-) :: CParamIndex -> CParamIndex -> CParamIndex # (*) :: CParamIndex -> CParamIndex -> CParamIndex # negate :: CParamIndex -> CParamIndex # abs :: CParamIndex -> CParamIndex # signum :: CParamIndex -> CParamIndex # fromInteger :: Integer -> CParamIndex #
Integral CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: CParamIndex -> CParamIndex -> CParamIndex # rem :: CParamIndex -> CParamIndex -> CParamIndex # div :: CParamIndex -> CParamIndex -> CParamIndex # mod :: CParamIndex -> CParamIndex -> CParamIndex # quotRem :: CParamIndex -> CParamIndex -> (CParamIndex, CParamIndex) # divMod :: CParamIndex -> CParamIndex -> (CParamIndex, CParamIndex) # toInteger :: CParamIndex -> Integer #
Real CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: CParamIndex -> Rational #
Show CParamIndex # | This just shows the underlying integer, without the data constructor.
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> CParamIndex -> ShowS # show :: CParamIndex -> String # showList :: [CParamIndex] -> ShowS #
Eq CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: CParamIndex -> CParamIndex -> Bool # (/=) :: CParamIndex -> CParamIndex -> Bool #
Ord CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: CParamIndex -> CParamIndex -> Ordering # (<) :: CParamIndex -> CParamIndex -> Bool # (<=) :: CParamIndex -> CParamIndex -> Bool # (>) :: CParamIndex -> CParamIndex -> Bool # (>=) :: CParamIndex -> CParamIndex -> Bool # max :: CParamIndex -> CParamIndex -> CParamIndex # min :: CParamIndex -> CParamIndex -> CParamIndex #
FFIType ParamIndex CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ParamIndex -> CParamIndex # fromFFI :: CParamIndex -> ParamIndex #

newtype CColumnIndex #

Constructors

CColumnIndex CInt |

#### Instances

Instances details

Enum CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: CColumnIndex -> CColumnIndex # pred :: CColumnIndex -> CColumnIndex # toEnum :: Int -> CColumnIndex # fromEnum :: CColumnIndex -> Int # enumFrom :: CColumnIndex -> [CColumnIndex] # enumFromThen :: CColumnIndex -> CColumnIndex -> [CColumnIndex] # enumFromTo :: CColumnIndex -> CColumnIndex -> [CColumnIndex] # enumFromThenTo :: CColumnIndex -> CColumnIndex -> CColumnIndex -> [CColumnIndex] #
Num CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: CColumnIndex -> CColumnIndex -> CColumnIndex # (-) :: CColumnIndex -> CColumnIndex -> CColumnIndex # (*) :: CColumnIndex -> CColumnIndex -> CColumnIndex # negate :: CColumnIndex -> CColumnIndex # abs :: CColumnIndex -> CColumnIndex # signum :: CColumnIndex -> CColumnIndex # fromInteger :: Integer -> CColumnIndex #
Integral CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: CColumnIndex -> CColumnIndex -> CColumnIndex # rem :: CColumnIndex -> CColumnIndex -> CColumnIndex # div :: CColumnIndex -> CColumnIndex -> CColumnIndex # mod :: CColumnIndex -> CColumnIndex -> CColumnIndex # quotRem :: CColumnIndex -> CColumnIndex -> (CColumnIndex, CColumnIndex) # divMod :: CColumnIndex -> CColumnIndex -> (CColumnIndex, CColumnIndex) # toInteger :: CColumnIndex -> Integer #
Real CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: CColumnIndex -> Rational #
Show CColumnIndex # | This just shows the underlying integer, without the data constructor.
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> CColumnIndex -> ShowS # show :: CColumnIndex -> String # showList :: [CColumnIndex] -> ShowS #
Eq CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: CColumnIndex -> CColumnIndex -> Bool # (/=) :: CColumnIndex -> CColumnIndex -> Bool #
Ord CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: CColumnIndex -> CColumnIndex -> Ordering # (<) :: CColumnIndex -> CColumnIndex -> Bool # (<=) :: CColumnIndex -> CColumnIndex -> Bool # (>) :: CColumnIndex -> CColumnIndex -> Bool # (>=) :: CColumnIndex -> CColumnIndex -> Bool # max :: CColumnIndex -> CColumnIndex -> CColumnIndex # min :: CColumnIndex -> CColumnIndex -> CColumnIndex #
FFIType ColumnIndex CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ColumnIndex -> CColumnIndex # fromFFI :: CColumnIndex -> ColumnIndex #

type CColumnCount = CColumnIndex #

# Miscellaneous

newtype CNumBytes #

Constructors

CNumBytes CInt |

#### Instances

Instances details

Enum CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: CNumBytes -> CNumBytes # pred :: CNumBytes -> CNumBytes # toEnum :: Int -> CNumBytes # fromEnum :: CNumBytes -> Int # enumFrom :: CNumBytes -> [CNumBytes] # enumFromThen :: CNumBytes -> CNumBytes -> [CNumBytes] # enumFromTo :: CNumBytes -> CNumBytes -> [CNumBytes] # enumFromThenTo :: CNumBytes -> CNumBytes -> CNumBytes -> [CNumBytes] #
Num CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: CNumBytes -> CNumBytes -> CNumBytes # (-) :: CNumBytes -> CNumBytes -> CNumBytes # (*) :: CNumBytes -> CNumBytes -> CNumBytes # negate :: CNumBytes -> CNumBytes # abs :: CNumBytes -> CNumBytes # signum :: CNumBytes -> CNumBytes # fromInteger :: Integer -> CNumBytes #
Integral CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: CNumBytes -> CNumBytes -> CNumBytes # rem :: CNumBytes -> CNumBytes -> CNumBytes # div :: CNumBytes -> CNumBytes -> CNumBytes # mod :: CNumBytes -> CNumBytes -> CNumBytes # quotRem :: CNumBytes -> CNumBytes -> (CNumBytes, CNumBytes) # divMod :: CNumBytes -> CNumBytes -> (CNumBytes, CNumBytes) # toInteger :: CNumBytes -> Integer #
Real CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: CNumBytes -> Rational #
Show CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> CNumBytes -> ShowS # show :: CNumBytes -> String # showList :: [CNumBytes] -> ShowS #
Eq CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: CNumBytes -> CNumBytes -> Bool # (/=) :: CNumBytes -> CNumBytes -> Bool #
Ord CNumBytes # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: CNumBytes -> CNumBytes -> Ordering # (<) :: CNumBytes -> CNumBytes -> Bool # (<=) :: CNumBytes -> CNumBytes -> Bool # (>) :: CNumBytes -> CNumBytes -> Bool # (>=) :: CNumBytes -> CNumBytes -> Bool # max :: CNumBytes -> CNumBytes -> CNumBytes # min :: CNumBytes -> CNumBytes -> CNumBytes #

data CDestructor #

https://www.sqlite.org/c3ref/c_static.html

`Ptr CDestructor` = `sqlite3_destructor_type`

c_SQLITE_STATIC :: Ptr CDestructor #

Tells SQLite3 that the content pointer is constant and will never change

c_SQLITE_TRANSIENT :: Ptr CDestructor #

Tells SQLite3 to make its own private copy of the data

c_SQLITE_UTF8 :: CInt #

# Custom functions

newtype ArgCount #

Number of arguments of a user defined SQL function.

Constructors

ArgCount Int |

#### Instances

Instances details

Bounded ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods minBound :: ArgCount # maxBound :: ArgCount #
Enum ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: ArgCount -> ArgCount # pred :: ArgCount -> ArgCount # toEnum :: Int -> ArgCount # fromEnum :: ArgCount -> Int # enumFrom :: ArgCount -> [ArgCount] # enumFromThen :: ArgCount -> ArgCount -> [ArgCount] # enumFromTo :: ArgCount -> ArgCount -> [ArgCount] # enumFromThenTo :: ArgCount -> ArgCount -> ArgCount -> [ArgCount] #
Num ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: ArgCount -> ArgCount -> ArgCount # (-) :: ArgCount -> ArgCount -> ArgCount # (*) :: ArgCount -> ArgCount -> ArgCount # negate :: ArgCount -> ArgCount # abs :: ArgCount -> ArgCount # signum :: ArgCount -> ArgCount # fromInteger :: Integer -> ArgCount #
Integral ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: ArgCount -> ArgCount -> ArgCount # rem :: ArgCount -> ArgCount -> ArgCount # div :: ArgCount -> ArgCount -> ArgCount # mod :: ArgCount -> ArgCount -> ArgCount # quotRem :: ArgCount -> ArgCount -> (ArgCount, ArgCount) # divMod :: ArgCount -> ArgCount -> (ArgCount, ArgCount) # toInteger :: ArgCount -> Integer #
Real ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: ArgCount -> Rational #
Show ArgCount # | This just shows the underlying integer, without the data constructor.
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> ArgCount -> ShowS # show :: ArgCount -> String # showList :: [ArgCount] -> ShowS #
Eq ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: ArgCount -> ArgCount -> Bool # (/=) :: ArgCount -> ArgCount -> Bool #
Ord ArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: ArgCount -> ArgCount -> Ordering # (<) :: ArgCount -> ArgCount -> Bool # (<=) :: ArgCount -> ArgCount -> Bool # (>) :: ArgCount -> ArgCount -> Bool # (>=) :: ArgCount -> ArgCount -> Bool # max :: ArgCount -> ArgCount -> ArgCount # min :: ArgCount -> ArgCount -> ArgCount #
FFIType ArgCount CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ArgCount -> CArgCount # fromFFI :: CArgCount -> ArgCount #

type ArgIndex = ArgCount #

Index of an argument to a custom function. Indices start from 0.

newtype CArgCount #

Constructors

CArgCount CInt |

#### Instances

Instances details

Bounded CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods minBound :: CArgCount # maxBound :: CArgCount #
Enum CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods succ :: CArgCount -> CArgCount # pred :: CArgCount -> CArgCount # toEnum :: Int -> CArgCount # fromEnum :: CArgCount -> Int # enumFrom :: CArgCount -> [CArgCount] # enumFromThen :: CArgCount -> CArgCount -> [CArgCount] # enumFromTo :: CArgCount -> CArgCount -> [CArgCount] # enumFromThenTo :: CArgCount -> CArgCount -> CArgCount -> [CArgCount] #
Num CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (+) :: CArgCount -> CArgCount -> CArgCount # (-) :: CArgCount -> CArgCount -> CArgCount # (*) :: CArgCount -> CArgCount -> CArgCount # negate :: CArgCount -> CArgCount # abs :: CArgCount -> CArgCount # signum :: CArgCount -> CArgCount # fromInteger :: Integer -> CArgCount #
Integral CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods quot :: CArgCount -> CArgCount -> CArgCount # rem :: CArgCount -> CArgCount -> CArgCount # div :: CArgCount -> CArgCount -> CArgCount # mod :: CArgCount -> CArgCount -> CArgCount # quotRem :: CArgCount -> CArgCount -> (CArgCount, CArgCount) # divMod :: CArgCount -> CArgCount -> (CArgCount, CArgCount) # toInteger :: CArgCount -> Integer #
Real CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toRational :: CArgCount -> Rational #
Show CArgCount # | This just shows the underlying integer, without the data constructor.
Instance details Defined in Database.SQLite3.Bindings.Types Methods showsPrec :: Int -> CArgCount -> ShowS # show :: CArgCount -> String # showList :: [CArgCount] -> ShowS #
Eq CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods (==) :: CArgCount -> CArgCount -> Bool # (/=) :: CArgCount -> CArgCount -> Bool #
Ord CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods compare :: CArgCount -> CArgCount -> Ordering # (<) :: CArgCount -> CArgCount -> Bool # (<=) :: CArgCount -> CArgCount -> Bool # (>) :: CArgCount -> CArgCount -> Bool # (>=) :: CArgCount -> CArgCount -> Bool # max :: CArgCount -> CArgCount -> CArgCount # min :: CArgCount -> CArgCount -> CArgCount #
FFIType ArgCount CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ArgCount -> CArgCount # fromFFI :: CArgCount -> ArgCount #

c_SQLITE_DETERMINISTIC :: CInt #

Tells SQLite3 that the defined custom SQL function is deterministic.

# Conversion to and from FFI types

class FFIType public ffi | public -> ffi, ffi -> public where #

The Database.SQLite3 and Database.SQLite3.Direct modules use higher-level representations of some types than those used in the FFI signatures (Database.SQLite3.Bindings). This typeclass helps with the conversions.

Methods

toFFI :: public -> ffi #

fromFFI :: ffi -> public #

#### Instances

Instances details

FFIType ArgCount CArgCount # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ArgCount -> CArgCount # fromFFI :: CArgCount -> ArgCount #
FFIType ColumnIndex CColumnIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ColumnIndex -> CColumnIndex # fromFFI :: CColumnIndex -> ColumnIndex #
FFIType ColumnType CColumnType # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ColumnType -> CColumnType # fromFFI :: CColumnType -> ColumnType #
FFIType Error CError # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: Error -> CError # fromFFI :: CError -> Error #
FFIType ParamIndex CParamIndex # |
Instance details Defined in Database.SQLite3.Bindings.Types Methods toFFI :: ParamIndex -> CParamIndex # fromFFI :: CParamIndex -> ParamIndex #