HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduledirect-sqlite-2.3.29Haskell2010

Database.SQLite3.Direct

This API is a slightly lower-level version of Database.SQLite3. Namely:

  • It returns errors instead of throwing them.

  • It only uses cheap conversions. None of these bindings convert from String or Text.

  • 17 types
  • 71 values

Connection management

10 declarations

Simple query execution

3 declarations

Statement management

8 declarations

Parameter and column information

5 declarations

Binding values to a prepared statement

6 declarations

Reading the result row

5 declarations

control loading of extensions

1 declaration

Result statistics

3 declarations

Create custom SQL functions

3 declarations

Extract function arguments

Set the result of a function

Create custom collations

2 declarations

Interrupting a long-running query

1 declaration
valueinterrupt :: Database -> IO ()
#

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

Cause any pending operation on the Database handle to stop at its earliest opportunity. This simply sets a flag and returns immediately. It does not wait for the pending operation to finish.

You'll need to compile with -threaded for this to do any good. Without -threaded, FFI calls block the whole RTS, meaning interrupt would never run at the same time as step.

Incremental blob I/O

7 declarations

Online Backup API

5 declarations

Types

7 declarations
datadata Blob
#

The type of blob handles used for incremental blob I/O

Constructors

Instances2Eq, Show
  • Eq BlobDefined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
  • Show BlobDefined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
datadata Backup
#

A handle for an online backup process.

Constructors

Instances2Eq, Show
  • Eq BackupDefined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
  • Show BackupDefined in direct-sqlite-2.3.29 · Database.SQLite3.Direct

Results and errors

datadata Error
#

Constructors

Instances5Eq, Show, Generic, FFIType, Rep

Special types

newtypenewtype Utf8
#

A ByteString containing UTF8-encoded text with no NUL characters.

Constructors

Instances6Eq, Ord, Show, IsString, Semigroup, Monoid
  • Eq Utf8Defined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
  • Ord Utf8Defined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
  • Show Utf8Defined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
  • IsString Utf8Defined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
    fromString = Utf8 . encodeUtf8 . pack
  • Semigroup Utf8Defined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
  • Monoid Utf8Defined in direct-sqlite-2.3.29 · Database.SQLite3.Direct
newtypenewtype ParamIndex
#

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

Instances9Bounded, Enum, Eq, Integral, Num, Ord, …
  • Bounded ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types

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

  • Enum ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Eq ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Integral ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Num ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Ord ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Real ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Show ParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types

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

  • FFIType ParamIndex CParamIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
newtypenewtype ColumnIndex
#

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

Constructors

Instances9Bounded, Enum, Eq, Integral, Num, Ord, …
  • Bounded ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types

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

  • Enum ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Eq ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Integral ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Num ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Ord ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Real ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Show ColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types

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

  • FFIType ColumnIndex CColumnIndexDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
newtypenewtype ArgCount
#

Number of arguments of a user defined SQL function.

Constructors

Instances9Bounded, Enum, Eq, Integral, Num, Ord, …
  • Bounded ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Enum ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Eq ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Integral ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Num ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Ord ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Real ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
  • Show ArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types

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

  • FFIType ArgCount CArgCountDefined in direct-sqlite-2.3.29 · Database.SQLite3.Bindings.Types
typetype ArgIndex = ArgCount
#

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