package caqti-driver-sqlite3

  1. Overview
  2. Docs
On This Page
  1. Error Details
Legend:
Library
Module
Module type
Parameter
Class
Class type

Sqlite3 driver for Caqti (bindings).

This driver is implemented in terms of the sqlite3 OPAM package, which provides bindings for libsqlite3. It handles URIs of the form

sqlite3://<path>?create=<bool>&write=<bool>

where <path> is passed to Sqlite3.db_open and the query string is used to determine its mode parameter. The <bool> parameters take the values true and false, and default to true.

The interface provided by this module should normally not be used by applications, but provides access to some Sqlite3 specifics in case they are needed.

Error Details

The following provides access to diagnostics collected from the Sqlite3 connection.

type Caqti_error.msg +=
  1. | Error_msg of {
    1. errcode : Sqlite3.Rc.t;
      (*

      The OCaml encoding of the error code reported by sqlite3_errcode.

      *)
    2. errmsg : string option;
      (*

      The error message reportedy by sqlite3_errmsg.

      *)
    }