Skip to the content.

SQLite3-OCaml - SQLite3 Bindings for OCaml

What is SQLite3-OCaml?

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.

The design of these bindings allows for a friendly coexistence with the old (version 2) SQLite and its OCaml wrapper ocaml-sqlite.

Usage

The API documentation is in file src/sqlite3.mli and also here: online.

SQLite3 has its own online documentation.

Examples

The test-directory in this distribution contains simple examples for testing features of this library. You can execute the tests by running: dune runtest.

Build issues

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, the assumption is that it supports Run-Time Loadable Extensions. If this feature has been explicitly disabled in the library, building applications will fail with something like:

Undefined symbols for architecture …:
  "_sqlite3_enable_load_extension", referenced from:
      _caml_sqlite3_enable_load_extension in libsqlite3_stubs.a(sqlite3_stubs.o)

Credits

Contact Information and Contributing

Please submit bugs reports, feature requests, contributions to the GitHub issue tracker.

Up-to-date information is available at: https://mmottl.github.io/sqlite3-ocaml