db_facts


a term centric abstraction layer for SQL databases

This library allows SWI to communicate with SQL databases via prolog terms representing facts in a database.
It serves two purposes. First, term structures can be used to interact with SQL databases and second, to provide a common abstraction layer for ODBC and proSQLite libraries of SWI-Prolog. It should also work with small modifications on Yap.

Version 0.2 (09/2016) allows for bulk db_assert/1 updates in SQLite (give a list of db_facts instead of a singe goal).

version 0.3 (12/2016) supports code-lists and strings as arguments to db facts.

Installation

It is highly recommended that you install from within SWI using its package manager.
To install simply do:

?- pack_install(db_facts).

And then load by :
?- [library(db_facts)].

Materials

Pldoc produced documentation: db_facts.html
See examples directory in the sources for examples.

Sources: db_facts

Author

Nicos Angelopoulos
---
London
December 2016, (v0.4)