direct-sqlite-2.3.28: Low-level binding to SQLite3. Includes UTF8 and BLOB support.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.SQLite3.Bindings.Types

Synopsis

Objects

Enumerations

Error

newtype CError Source #

Constructors

CError CInt 

Instances

Instances details
Show CError Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Eq CError Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Methods

(==) :: CError -> CError -> Bool #

(/=) :: CError -> CError -> Bool #

FFIType Error CError Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

decodeError :: CError -> Error Source #

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.

data Error Source #

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 Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Associated Types

type Rep Error :: Type -> Type #

Methods

from :: Error -> Rep Error x #

to :: Rep Error x -> Error #

Show Error Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Eq Error Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

FFIType Error CError Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

type Rep Error Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

type Rep Error = D1 ('MetaData "Error" "Database.SQLite3.Bindings.Types" "direct-sqlite-2.3.28-CVgZeQFHW6g9SEzRJSf08z" '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

decodeColumnType :: CColumnType -> ColumnType Source #

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

Indices

newtype ParamIndex Source #

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

When a query is prepared, 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 Source #

Limit min/max bounds to fit into SQLite's native parameter ranges.

Instance details

Defined in Database.SQLite3.Bindings.Types

Enum ParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num ParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral ParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real ParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show ParamIndex Source #

This just shows the underlying integer, without the data constructor.

Instance details

Defined in Database.SQLite3.Bindings.Types

Eq ParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord ParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

FFIType ParamIndex CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

newtype ColumnIndex Source #

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

Constructors

ColumnIndex Int 

Instances

Instances details
Bounded ColumnIndex Source #

Limit min/max bounds to fit into SQLite's native parameter ranges.

Instance details

Defined in Database.SQLite3.Bindings.Types

Enum ColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num ColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral ColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real ColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show ColumnIndex Source #

This just shows the underlying integer, without the data constructor.

Instance details

Defined in Database.SQLite3.Bindings.Types

Eq ColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord ColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

FFIType ColumnIndex CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

type ColumnCount = ColumnIndex Source #

Number of columns in a result set.

Indices (FFI)

newtype CParamIndex Source #

Constructors

CParamIndex CInt 

Instances

Instances details
Enum CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show CParamIndex Source #

This just shows the underlying integer, without the data constructor.

Instance details

Defined in Database.SQLite3.Bindings.Types

Eq CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

FFIType ParamIndex CParamIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

newtype CColumnIndex Source #

Constructors

CColumnIndex CInt 

Instances

Instances details
Enum CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show CColumnIndex Source #

This just shows the underlying integer, without the data constructor.

Instance details

Defined in Database.SQLite3.Bindings.Types

Eq CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

FFIType ColumnIndex CColumnIndex Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Miscellaneous

newtype CNumBytes Source #

Constructors

CNumBytes CInt 

Instances

Instances details
Enum CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Eq CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord CNumBytes Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

data CDestructor Source #

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

Ptr CDestructor = sqlite3_destructor_type

c_SQLITE_STATIC :: Ptr CDestructor Source #

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

c_SQLITE_TRANSIENT :: Ptr CDestructor Source #

Tells SQLite3 to make its own private copy of the data

Custom functions

newtype ArgCount Source #

Number of arguments of a user defined SQL function.

Constructors

ArgCount Int 

Instances

Instances details
Bounded ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Enum ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show ArgCount Source #

This just shows the underlying integer, without the data constructor.

Instance details

Defined in Database.SQLite3.Bindings.Types

Eq ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord ArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

FFIType ArgCount CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

type ArgIndex = ArgCount Source #

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

newtype CArgCount Source #

Constructors

CArgCount CInt 

Instances

Instances details
Bounded CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Enum CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Num CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Integral CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Real CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Show CArgCount Source #

This just shows the underlying integer, without the data constructor.

Instance details

Defined in Database.SQLite3.Bindings.Types

Eq CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

Ord CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

FFIType ArgCount CArgCount Source # 
Instance details

Defined in Database.SQLite3.Bindings.Types

c_SQLITE_DETERMINISTIC :: CInt Source #

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 Source #

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 Source #

fromFFI :: ffi -> public Source #