Did you know ... Search Documentation:
Pack terminus_store_prolog -- prolog/terminus_store.pl
PublicShow source
 open_memory_store(-Store:store) is det
Opens an in-memory store and unifies it with Store.
Arguments:
Store- the returned in-memory store.
 open_directory_store(+Path:text, -Store:store) is det
Opens a store backed by a directory, and unifies it with Store.

This predicate does not check if the directory actually exists, but other store-related predicates will error when used with a store backed by a non-existent directory.

Arguments:
Path- a file system path to the store directory. This can be either absolute and relative.
Store- the returned directory store.
 create_named_graph(+Store:store, +Name:text, -Graph:named_graph) is det
Create a new named graph with the given name, and unifies it with Graph.
Arguments:
Store- the store to create the graph in.
Name- the name which the new graph should have.
Graph- the returned named graph.
throws
- if a graph with the given name already exists.
 open_named_graph(+Store:store, +Name:text, -Graph:named_graph) is semidet
Opens an existing named graph with the given name.

Fails if no graph with that name exists.

Arguments:
Store- the store to create the graph in.
Name- the name of the graph to be opened.
Graph- the returned named graph.
 head(+Graph:named_graph, -Layer:layer) is semidet
Retrieve the layer that a named graph points at. This is the equivalent of opening a read transaction with snapshot isolation on a named graph.

Fails if the given graph has no head yet.

Arguments:
Graph- the named graph to retrieve the head layer from.
Layer- the returned head layer.
 nb_set_head(+Graph:named_graph, +Layer:layer) is semidet
Set the given layer as the new head of the given graph.

Fails if the new layer is not a proper child of the current head.

This predicate does not support backtracking.

Arguments:
Graph- the named graph to set the head layer of.
Layer- the layer to make the new head of the graph.
 open_write(+Store_Or_Layer:term, -Builder:layer_builder) is det
Creates a layer builder from either a parent layer, or a store.

When Store_Or_Layer is a store, the resulting builder will create a base layer.

When Store_Or_Layer is a layer, the resulting builder will create a child layer whose parent is the given layer.

Arguments:
Store_Or_layer- a store when creating a new base layer, or the parent layer when creating a child layer.
Builder- a layer builder to create the new layer.
 nb_commit(+Builder:layer_builder, -Layer:layer) is det
Commit the layer builder, turning it into a layer.
Arguments:
Builder- the layer builder to commit.
Layer- the layer that will be returned.
throws
- if the builder has already been committed.
 node_and_value_count(+Layer:layer, -Count:integer) is det
Unify Count with the amount of nodes and values known to this layer, including all parent layers.
Arguments:
Layer- the layer for which to get a count.
Count- the returned count.
 predicate_count(+Layer:layer, -Count:integer) is det
Unify Count with the amount of predicates known to this layer, including all parent layers.
Arguments:
Layer- the layer for which to get a count.
Count- the returned count.
 parent(+Layer:layer, +Parent:layer) is semidet
Unifies Parent with the parent layer of Layer. Fails if that layer has no parent.
Arguments:
Layer- the layer for which to do the parent lookup.
Parent- the retrieved parent layer.
 nb_add_triple(+Builder, +Subject, +Predicate, +Object) is semidet
Add a triple to the builder.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 nb_remove_triple(Arg1, Arg2, Arg3, Arg4)
 builder_committed(Arg1)
 subject_id(Arg1, Arg2, Arg3)
 predicate_id(Arg1, Arg2, Arg3)
 object_id(Arg1, Arg2, Arg3)
 id_triple(Arg1, Arg2, Arg3, Arg4)
 triple(Arg1, Arg2, Arg3, Arg4)
 id_triple_addition(Arg1, Arg2, Arg3, Arg4)
 triple_addition(Arg1, Arg2, Arg3, Arg4)
 id_triple_removal(Arg1, Arg2, Arg3, Arg4)
 triple_removal(Arg1, Arg2, Arg3, Arg4)
 layer_addition_count(Arg1, Arg2)
 layer_removal_count(Arg1, Arg2)
 layer_total_addition_count(Arg1, Arg2)
 layer_total_removal_count(Arg1, Arg2)
 layer_total_triple_count(Arg1, Arg2)
 layer_to_id(Arg1, Arg2)
 store_id_layer(Arg1, Arg2, Arg3)
 pack_export(Arg1, Arg2, Arg3)
 pack_layerids_and_parents(Arg1, Arg2)
 pack_import(Arg1, Arg2, Arg3)