Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "terminus_store_prolog"

Title:Use the Terminus-Store Rust library from Prolog
Rating:Not rated. Create the first rating!
Latest version:0.19.8
SHA1 sum:5e6bfc207a242ad4f26fa83b8818d91dd3fe6f36
Home page:https://github.com/terminusdb/terminus_store_prolog

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.4.2d9112fcec4ebc6494a66a1f33268cd0725a24d6d1https://github.com/terminusdb/terminus_store_prolog/archive/v0.4.2.zip
0.4.31199a64c22bb0a05e7d4cc57abb13829bcaab0051https://github.com/terminusdb/terminus_store_prolog.git
4fbe2a3bd0eeeaef829756452a26ef6704a435672https://github.com/terminusdb/terminus_store_prolog/archive/v0.4.3.zip
0.4.4077c078fa50212fc16a6e8733a89b318c048a0b91https://github.com/terminusdb/terminus_store_prolog/archive/v0.4.4.zip
ceabddc1849ef6356dd5665c3be7d620da229d4b1https://github.com/terminusdb/terminus_store_prolog.git
0.6.01c93469d8032addbe0c48e0c6d04b423d1c5aff01https://github.com/terminusdb/terminus_store_prolog/archive/v0.6.0.zip
297c24bce6299be31c73e27d65068dcedcf805c93https://github.com/terminusdb/terminus_store_prolog/archive/v0.6.0.zip
0.7.0e41a00fc253f3b6b221b90149b38e82517c3200c3https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.0.zip
0.7.1320ad8be1be2be80bdca9245017fea0288e568103https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.1.zip
0.7.2ec70c4abd4c1472e2ceb7e333a89592279d6319a21https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.2.zip
0.7.3532c85afe465e349615176f6c22359d657c0bd9a5https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.3.zip
0.7.4f575a235292fe58108c8a436a48ba9cdeca20c621https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.4.zip
0.7.5942cf4b4a85ac2303b5207cd14ba2ca68952973e37https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.5.zip
0.7.623ff9af201d0ed879fa7d44885e0f5db8d6cce6b117https://github.com/terminusdb/terminus_store_prolog/archive/v0.7.6.zip
0.8.067916bcd264712d351e01f50963ff5f66e105b7b254https://github.com/terminusdb/terminus_store_prolog/archive/v0.8.0.zip
0.8.25e56b6fca002222a9a3d154c7e6234efb897c6c52https://github.com/terminusdb/terminus_store_prolog/archive/v0.8.2.zip
0.9.04ca446acd037da046bec9739f6bd8c5622d4d2551https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.0.zip
0.9.1fa1a5ea87d9c80ec57517f6a96784622671b7d505https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.1.zip
0.9.2fa2eba44ae6039ab89bd323855ed18e4f753240e1https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.2.zip
0.9.37ee8eff824f5359897cdada49dc3f9264f1f0ef03https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.3.zip
0.9.4bdaca502465bdfdfb2775ae123b2682d0bc69dbc2https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.4.zip
0.9.583e0046d40babba0abfbf2fa21a5babb7a6c95f317https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.5.zip
0.9.62cc2474261aadc06d9acdf022bbe820723f347571https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.6.zip
0.9.71a1fdccf734af02467430c19efb6e75be7e6bddd1https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.7.zip
0.9.83ccd43d60374443ef1b9d4adc2930f1d02c0780d1https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.8.zip
4a664aa6778a95f17fd4f8f7264617dfe89592373https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.8.zip
0.9.9e36c2cef146b07a135f7b95ef40620f8901a9ddb36https://github.com/terminusdb/terminus_store_prolog/archive/v0.9.9.zip
0.10.096a45585def19e296b7e4c813074ca5f673c98e529https://github.com/terminusdb/terminus_store_prolog/archive/v0.10.0.zip
0.10.36be0854d764695fcb759aaa2e0b32c2751820e2714https://github.com/terminusdb/terminus_store_prolog/archive/v0.10.3.zip
0.10.48c9aab127ec474cdbc97a62dae609ad6e03959291https://github.com/terminusdb/terminus_store_prolog/archive/v0.10.4.zip
0.11.0ba82cc5395a50f82243002c947d9ffd28db354b46https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.0.zip
0.11.1ee6d22b0cb9aac4d92216d24505150bd706a59331https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.1.zip
0.11.27758d4b59b61789a93d914d7997f235dcf2b6b5a2https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.2.zip
0.11.329ec992722840ed036a7de46726fe868d308b45d3https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.3.zip
0.11.4572d7d5f15166fc78458ee5a76791e4bff5e11c03https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.4.zip
0.11.5afc71922cf6263beb79d40abc329a6e48caea45013https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.5.zip
0.11.5.150f6c0c729e0f667c4731f57ab8ee2ba888165921https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.5.1.zip
0.11.6a34af19727d087a4362bac3528418fc26bfebfa14https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.6.zip
0.11.796b31d4e27cf5ea906bbe918798b64eb769430327https://github.com/terminusdb/terminus_store_prolog/archive/v0.11.7.zip
0.12.05254757e5985b9aa94f9cf8c3bf66cf30d52f32d1https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.0.zip
0.12.108314973b1d8e37ba3dce507ffc0cba467edd5811https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.1.zip
4ce2d83cbb9c6142f7d0c11e6a42de1d355692621https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.1.zip
0.12.23a8e5c50ccd41487630bdce1050d8418f2bc35771https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.2.zip
0.12.3f16721ad5ffe8078481f30281ee4bdb3dea662c38https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.3.zip
0.12.43c13efc2749123a0ecade78ad12a568ac17507272https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.4.zip
f7625074266c03d7a722848c0ee64b86d63269cb1https://github.com/terminusdb/terminus_store_prolog.git
0.12.55ab88a8d5c6d15c8e44277d8e94f7c34a51e2b761https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.5.zip
0.12.63136fc32471b06817f553d4ce1788db94bb8f2401https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.6.zip
756c9201e74d60442795f5ddae5030c48bea39aa2https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.6.zip
0.12.7f9731ec0529334180acd914415e345efee755ffc1https://github.com/terminusdb/terminus_store_prolog/archive/v0.12.7.zip
0.13.15600845ad86a659a118503de25e534874d7f978134https://github.com/terminusdb/terminus_store_prolog/archive/v0.13.1.zip
0.13.229dc35d9663d047caf43cdc8216f3ae29a234c792https://github.com/terminusdb/terminus_store_prolog/archive/v0.13.2.zip
0.13.3ec2e810a286488daced973148f2c1d1de9cad33f1https://github.com/terminusdb/terminus_store_prolog/archive/v0.13.3.zip
0.13.43a66b0bb7fa4a53834164225c05c4f7a67104dc81https://github.com/terminusdb/terminus_store_prolog/archive/v0.13.4.zip
0.13.51673087f6559f4de952cb5db582fc4bf50360dcb27https://github.com/terminusdb/terminus_store_prolog/archive/v0.13.5.zip
0.14.0395a6d1bfd6a2d058b8da07c129bde1ad2894e0f1https://github.com/terminusdb/terminus_store_prolog/archive/v0.14.0.zip
0.14.154c8c74ea64a28282628048460eb02a0d662901a1https://github.com/terminusdb/terminus_store_prolog/archive/v0.14.1.zip
0.14.2c082907590865c423e4ee9bf49e1a8a002a66ec63https://github.com/terminusdb/terminus_store_prolog/archive/v0.14.2.zip
0.14.380bbeaad48ca1b8de07b406e6eddf89a396c439e13https://github.com/terminusdb/terminus_store_prolog/archive/v0.14.3.zip
0.15.03dd9f935d93454f3f1d7b4f52c3499421ee491d24https://github.com/terminusdb/terminus_store_prolog/archive/v0.15.0.zip
b473c6619034435090370ca3797bd427629575412https://github.com/terminusdb/terminus_store_prolog/archive/v0.15.0.zip
0.16.054d8068740b648ed3526fb6e6505aca29fadc9aa2https://github.com/terminusdb/terminus_store_prolog/archive/v0.16.0.zip
0.16.1cb83698836561fe61acf6c7455c77e09bc4f74fa10https://github.com/terminusdb/terminus_store_prolog/archive/v0.16.1.zip
0.16.289124cdfba4829bed3e7793d01ccb62cb01fd1f61https://github.com/terminusdb/terminus_store_prolog/archive/v0.16.2.zip
9c676a58e7ac585959c0cdfb0d84e99a26d2cd691https://github.com/terminusdb/terminus_store_prolog/archive/v0.16.2.zip
0.16.35718699af0534afb6723ca734be827aecd79d1f31https://github.com/terminusdb/terminus_store_prolog/archive/v0.16.3.zip
0.16.4297447dde319b45993b09f929be3aad5a12f5a6747https://github.com/terminusdb/terminus_store_prolog/archive/v0.16.4.zip
0.17.0de520d648f5fc9c99c8cda0f09b186b3e466645f9https://github.com/terminusdb/terminus_store_prolog/archive/v0.17.0.zip
0.18.0124244d609f624dea9157097df8d246854437bba1https://github.com/terminusdb/terminus_store_prolog/archive/v0.18.0.zip
0.18.120ff81764256a782a01d229ec8b268506b3d91ce32https://github.com/terminusdb/terminus_store_prolog/archive/v0.18.1.zip
0.19.026ff48d98389a8d4fb2aaf8b2ebd3614209265d542https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.0.zip
4e59c7cc5dfa940630468586b1e0f319b2fb4dce2https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.0.zip
0.19.13951dce2e47b61bdc8f277ea77a620d4bc80189a732https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.1.zip
0.19.2d8cf1d639028cecf00bbc2bbe3b40ef1c4f80d31133https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.2.zip
0.19.3144e05adeaf34efd3ba8e283a1b9c7a965d67c4e244https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.3.zip
0.19.432060210f2cf8917486820260148b9434f24bec7192https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.4.zip
0.19.50e1ff79f5163b5ba461543c1e75f05100d8100ab373https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.5.zip
0.19.623ccd581313d34ebfb2a6aed85fdd748e7cfd320204https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.6.zip
0.19.7e6417f1dc1f98918ab375763dcc541e57c4d97cb553https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.7.zip
0.19.85e6bfc207a242ad4f26fa83b8818d91dd3fe6f36239https://github.com/terminusdb/terminus_store_prolog/archive/v0.19.8.zip

terminus-store prolog bindings

![Actions Status](https://github.com/terminusdb/terminus_store_prolog/actions)

Prolog bindings for the terminus-store Rust library.

Requirements

  • cargo
  • clang
  • swi-prolog (with the include headers)

Installing

This library is downloadable through SWI-Prolog's package management system. In a swipl instance, run

pack_install(terminus_store_prolog).

Then you can use the library with

use_module(library(terminus_store)).

Compiling and running without installing (for testing purposes)

If you need to compile manually, for example to test a change without reinstalling the pack, follow these instructions.

Also, use the provided `./script/swipl` script to start a test instance. This will ensure the foreign library will be located properly.

make
./script/swipl

Running the tests

make
./script/test

Examples

Creating a named graph and adding a triple

Create a new directory (testdir in this example), then do the following:

open_directory_store("testdir", Store),
open_write(Store, Builder),
create_named_graph(Store, "sometestdb", DB),
nb_add_triple(Builder, "Subject", "Predicate", value("Object")),
nb_commit(Builder, Layer),
nb_set_head(DB, Layer).

Add a triple to an existing named graph

open_directory_store("testdir", Store),
open_named_graph(Store, "sometestdb", DB),
open_write(DB, Builder),
nb_add_triple(Builder, "Subject2", "Predicate2", value("Object2")),
nb_commit(Builder, Layer),
nb_set_head(DB, Layer),

Query triples

open_directory_store("testdir", Store),
open_named_graph(Store, "sometestdb", DB),
head(DB, Layer),
triple(Layer, Subject, Predicate, Object).

Convert strings to ids and query by id

open_directory_store("testdir", Store),
open_named_graph(Store, "sometestdb", DB),
head(DB, Layer),
subject_id(Layer, "Subject", S_Id),
id_triple(Layer, S_Id, P_Id, O_Id),
predicate_id(Layer, Predicate, P_Id),
object_id(Layer, Object, O_Id).

Contents of pack "terminus_store_prolog"

Pack contains 27 files holding a total of 192K bytes.