Make.SThe type of the graph, abstract. It usually includes all information needed by the other functions, as various graphs of the same kind can be used in the same application.
exception Error of errorThis is the exception raised by the functions of the module in case of error.
val string_of_error : error -> stringThis function returns a message from the given error.
Creationg of the graph. The graph has a name which is a IRI.
val graph_size : g -> intReturn the number of triples in the graph.
Adding a triple to the graph.
Removing a triple from the graph.
val add_triple_t : g -> Term.triple -> unitAdding a triple to the graph, curryfied form.
val rem_triple_t : g -> Term.triple -> unitRemoving a triple from the graph, curryfied form.
subjects_of g ~pred ~obj returns the list of nodes which are subjects in triples with the specified predicate and object.
predicates_of g ~sub ~obj returns the list of nodes which are predicates in triples with the specified subject and object.
objects_of g ~sub ~pred returns the list of nodes which are objects in triples with the specified subject and predicate.
val find :
?sub:Term.term ->
?pred:Iri.t ->
?obj:Term.term ->
g ->
Term.triple listfind ?sub ?pred ?obj g returns the list of triples matching the constraints given by the optional subject, predicate and object. One can specify, zero, one, two or three of these nodes.
Same as find but only returns true if at least one triple of the graph matches the constraints.
val exists_t : Term.triple -> g -> boolCurryfied version of exists.
val folder : g -> Term.TSet.t Iri.Map.t Term.TMap.t optionIf available, return a structure to iterate depth first in the graph.
val transaction_start : g -> unitStart a transaction. All storage may not support transactions.
val transaction_commit : g -> unitCommit.
val transaction_rollback : g -> unitRollback.
val new_blank_id : g -> Term.blank_idForging a new, unique blank node id.
val rem_namespace : g -> string -> unitmodule BGP : Storage_BGP with type g = g