Implementation of a simple graph type implementing IGraph. On typically adds to it with [[<s> <p> <o>]...]. One queries it with a simple graph pattern of the form [[<s> <p> <o>]...] With variables of the form :?x.
Implementation of a simple graph type implementing IGraph. On typically adds to it with [[<s> <p> <o>]...]. One queries it with a simple graph pattern of the form [[<s> <p> <o>]...] With variables of the form :?x.
Returns <g>, with <to-add> added Where <g> is a Graph <to-add> is interpetable as a set of triples
Returns <g>, with <to-add> added Where <g> is a Graph <to-add> is interpetable as a set of triples
(make-graph &
{:keys [schema contents]
:or {schema [:igraph.graph/subject :igraph.graph/predicate
:igraph.graph/object]
contents {}}})
Returns <graph>, intialized per optional <schema> and <contents> Where <schema> is not presently used <contents> is a normal-form representation of initial contents. see also igraph/normal-form.
Returns <graph>, intialized per optional <schema> and <contents> Where <schema> is not presently used <contents> is a normal-form representation of initial contents. see also igraph/normal-form.
(query-graph g graph-pattern)
Returns #{<binding>...} for <graph-pattern> applied to <g> Where <g> is a Graph <graph-pattern> := [[<var-or-value> <var-or-value> <var-or-value>]...] <var-or-value> is in #{<var> <value>} <var> is a keyword whose name begins with '?' <value> is a value which must match an element of <g> exactly. <binding> := {<var> <matching-value>, ...} <matching-value> matches <var> within <graph-pattern> applied to <g>
Returns #{<binding>...} for <graph-pattern> applied to <g> Where <g> is a Graph <graph-pattern> := [[<var-or-value> <var-or-value> <var-or-value>]...] <var-or-value> is in #{<var> <value>} <var> is a keyword whose name begins with '?' <value> is a value which must match an element of <g> exactly. <binding> := {<var> <matching-value>, ...} <matching-value> matches <var> within <graph-pattern> applied to <g>
(query-var? spec)
Returns true iff <spec> is a query variable (symbol whose name starts with ?)
Returns true iff <spec> is a query variable (symbol whose name starts with ?)
Returns <g>, with <to-add> added Where <g> is a Graph <to-add> is interpetable as a set of triples
Returns <g>, with <to-add> added Where <g> is a Graph <to-add> is interpetable as a set of triples
(unique coll)
(unique coll on-plural)
Returns the single member of <coll>, or nil if <coll> is empty. Calls <if-plural> if there is more than one member (default is to throw an Exception). Where <coll> is a collection <if-plural> := (fn [coll] ...) -> <value>, default raises an error. Note: this can be used when you've called (G s p) and you're sure there is only one object.
Returns the single member of <coll>, or nil if <coll> is empty. Calls <if-plural> if there is more than one member (default is to throw an Exception). Where <coll> is a collection <if-plural> := (fn [coll] ...) -> <value>, default raises an error. Note: this can be used when you've called (G s p) and you're sure there is only one object.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close