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.13.5
SHA1 sum:1673087f6559f4de952cb5db582fc4bf50360dcb
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.51673087f6559f4de952cb5db582fc4bf50360dcb2https://github.com/terminusdb/terminus_store_prolog/archive/v0.13.5.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
  • gcc
  • 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.

Use the wrapper script `./make.sh` rather than the Makefile directly. The wrapper script will set up swipl environment variables which the build needs.

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

./make.sh
./run_swipl

Running the tests

./make.sh
./run_swipl -g run_tests -g halt

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("Subject", S_Id),
id_triple(Layer, S_Id, P_Id, O_Id),
predicate_id(Predicate, P_Id),
object_id(Object, O_Id).

Contents of pack "terminus_store_prolog"

Pack contains 26 files holding a total of 231K bytes.