package sqlite3
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3b1f1e652e2be8f6c987c9de8b9d9fb54c9fdb948ac0850c8b9504bf82feea61
sha512=ebebce2e0467e100b36c1727f3720e17ec2c5aba3fdfcffa6f224afbf0e34ef6a676b9793943ec8d8fa38c7922641cac810611efb9ffd1427c8dcfa0dd6affaf
Description
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.
README
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)
- You can check if your library is missing loadable extensions by searching it for the string
OMIT_LOAD_EXTENSION
. - If you need to change where
pkg-config
will look for the SQLite3 library, set thePKG_CONFIG_PATH
environment variable to the new directory. Setting theSQLITE3_OCAML_BREWCHECK
environment variable automates this. This will instruct the build to check for the installation of a brewed version of SQLite and routepkg-config
appropriately. - You can explicitly disable run-time loadable extensions by calling
configure
with the flag--disable-loadable-extensions
or by setting the environment variableSQLITE3_DISABLE_LOADABLE_EXTENSIONS
if linking problems persist. - Due to frequent installation issues with loadable extensions on Mac OS X, the default there is to disable them. You will have to explicitly enable them on that platform.
Credits
- Mikhail Fedotov wrote ocaml-sqlite for SQLite version 2. His bindings served as a reference for this wrapper, but SQLite3 is a complete rewrite.
- Christian Szegedy wrote the initial release for SQLite version 3.
- Markus Mottl rewrote Christian's bindings for Jane Street Holding, LLC to clean up some issues and to make it perform better in multi-threaded environments.
- Enrico Tassi contributed support for user-defined scalar functions.
- Markus W. Weissmann contributed backup functionality.
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
Dependencies (4)
-
conf-sqlite3
build
- dune-configurator
-
ocaml
>= "4.12"
-
dune
>= "2.7"
Dev Dependencies (2)
-
odoc
with-doc
-
ppx_inline_test
with-test
Used by (23)
- benchpress
- benchpress-server
-
calculon
>= "0.8"
- caqti-driver-sqlite3
- catapult-sqlite
- compsort
- current
- current_web
-
eliom
< "9.0.0"
- fun-sqlite
- google-drive-ocamlfuse
-
guardian
< "0.1.0"
- lemonade-sqlite
- links-sqlite3
- MlFront_Cache
- obuilder
- ocluster
-
ocsigenserver
< "5.0.1"
- ocsipersist-sqlite
-
omigrate
>= "0.3.0"
-
oraft
>= "0.3.0"
- sqlite3_utils
-
yosqlite
>= "0.2"
Conflicts
None