~nytpu/sqlite-ada

Ada 2012 Bindings to SQLite 3
update vendored SQLite bump version
Update vendored SQLite to 3.44.0, bump library version to v1.1.1
Update vendored SQLite to 3.43.2, bump library version to 1.1.0

clone

read-only
https://git.sr.ht/~nytpu/sqlite-ada
read/write
git@git.sr.ht:~nytpu/sqlite-ada

You can also use your local clone with git send-email.

#SQLite-Ada — Ada 2012 Bindings to SQLite 3

builds.sr.ht status license: MPL-2.0

Thick Ada bindings to SQLite 3.

#Documentation

An example program is available: src/example/

The complete package hierarchy, with each specification documented:

  • SQLite: root package with common types and exceptions.
    • SQLite.Blobs: incremental BLOB I/O using streams.
    • SQLite.Connections: opening connections to databases, used throughout the rest of the library.
    • SQLite.Extensions: loading and unloading shared and static SQLite extensions.
    • SQLite.Limits: view and configure various limits for a database connection.
    • SQLite.Statements: preparing SQL statements, binding parameters, and iterating over the result rows.
    • SQLite.Utils: utilities for serializing and deserializing Stream_Element_Arrays, for using BLOBS when SQLite.Blobs is unsuitable (namely because SQLite's BLOB I/O interface cannot change the size).

You'll want SQLite's own SQL documentation at hand for creating SQL queries: https://sqlite.org/lang.html. You'll likely also want SQLite's own scrupulously thorough documentation for the C API at hand to understand the subtleties of the bindings: https://sqlite.org/c3ref/intro.html.

#Using

Add this repo as a subtree or submodule in your project and include with "path/to/sqlite_ada.gpr"; in your GPRbuild file.

You may also install the library & specification in a system library directory and include it from there.

#Compiling

#Requirements

  • GPRbuild
  • An Ada 2012 compiler and standard library
  • A C compiler and standard library.
  • POSIX-compatible make(1) (optional). Most makes (including GNU Make and BSD Make) support the POSIX standard.
  • SQLite installed system-wide, if you do not want to use the vendored, statically linked version.

#Building

git clone https://git.sr.ht/~nytpu/sqlite-ada && cd sqlite-ada
make
make example  # builds example program
sudo make install

You may also use plain gprbuild and gprinstall commands rather than the convenience makefile.

Set the SQLITE_USE_EXTERNAL env var to true to link to the system SQLite and not use the vendored version.

Set SQLITE_BUILD_FLAGS with a comma-separated list of SQLite compile-time options to build the vendored SQLite with. Has no effect when linking to a system SQLite.

#Contributing

The upstream URL of this project is https://git.sr.ht/~nytpu/sqlite-ada. Send suggestions, bugs, patches, and other contributions to ~nytpu/public-inbox@lists.sr.ht. For help sending a patch through email, see https://git-send-email.io. You can browse the list archives at https://lists.sr.ht/~nytpu/public-inbox.

If you have a very large set of changes, please use git request-pull rather than sending a large patchset.

Copyright (c) 2023 nytpu <alex [at] nytpu.com>

Licensed under the terms of the Mozilla Public License version 2.0. You can view a copy of the MPL in LICENSE or at https://www.mozilla.org/en-US/MPL/2.0/.

SQLite is dedicated to the public domain by its authors. Full details available at https://sqlite.org/copyright.html.