During 2023-24, ALS Prolog was extended to support interfaces to external databases implemented in SQLite. The machinery for creating the interface tools is contained at ALSProlog/extensions/sqlite in the ALS build tree. One must execute a few steps to generate the necessary files:
> cd foreign_sdk/unix
sh build.sh
sqlite3_intf.psl
:
> cd extensions/sqlite
make sqlite3_intf.psl
doc_examples.pro prolog_sqlite3_doc.txt sqlite3_intf.pro
README.md sqlite3_intf.c sqlite3_intf.psl
tests_sqlite3_intf.pro
The file sqlite3_intf.psl
implements the low-level interface between ALS Prolog and SQLite3. The companion file sqlite3_intf.pro
implements a more convenient prolog api over that file. The file prolog_sqlite3_doc.txt
documents the interface presented by sqlite3_intf.pro;
code for examples discussed in this file is contained in doc_examples.pro
. The file tests_sqlite3_intf.pro
contains various tests which can be run to display functionality.
sqlite3_intf.pro
and sqlite3_intf.psl
both need to be consulted together into any ALS Prolog image intending to utilize the SQLite3 interface.
The page Pseudo Haiku utilizes this interface with an SQLite3 database.