Page
Library
Module
Module type
Parameter
Class
Class type
Source
SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client API. Sqlite3 is a self-contained, serverless, zero-configuration, transactional SQL database engine with outstanding performance for many use cases.
These bindings are written in a way that enables a friendly coexistence with the old (version 2) SQLite and its OCaml wrapper ocaml-sqlite
.
The API in file src/sqlite3.mli
is fully documented. It can also be found online.
SQLite3 has its own online documentation.
The test
-directory in this distribution contains a few simple examples for testing various features of this library. The tests can be run by executing dune runtest
.
SQLite3-OCaml depends on pkg-config
to locate and compile against an SQLite3 library.
If the SQLite3 version is greater than or equal to 3.3.7, it is assumed that it supports Run-Time Loadable Extensions. If this feature has been explicitly disabled in the library, building applications will fail with:
Undefined symbols for architecture ...:
"_sqlite3_enable_load_extension", referenced from:
_caml_sqlite3_enable_load_extension in libsqlite3_stubs.a(sqlite3_stubs.o)
(maybe you meant: _caml_sqlite3_enable_load_extension)
OMIT_LOAD_EXTENSION
.pkg-config
will look for the SQLite3 library, set the PKG_CONFIG_PATH
environment variable to the new directory. This can be automated by setting the SQLITE3_OCAML_BREWCHECK
environment variable. This will instruct the build to see if a brewed version of SQLite is installed and route pkg-config
appropriately.configure
with the flag --disable-loadable-extensions
or by setting the environment variable SQLITE3_DISABLE_LOADABLE_EXTENSIONS
if linking problems persist.Please submit bugs reports, feature requests, contributions and similar to the GitHub issue tracker.
Up-to-date information is available at: https://mmottl.github.io/sqlite3-ocaml