Implements a full query engine based on fully indexed data.
Implements a full query engine based on fully indexed data.
(add-to-graph graph data)
Inputs: [graph data :- Results]
Inputs: [graph data :- Results]
(create-binding nm values)
Inputs: [nm :- InSpec values] Returns: Bindings
Creates a bindings between a name and a set of values. If the name is singular, then that name is bound to the values. If the name is a seq, then each name in the seq is bound to the corresponding offset in each value.
Inputs: [nm :- InSpec values] Returns: Bindings Creates a bindings between a name and a set of values. If the name is singular, then that name is bound to the values. If the name is a seq, then each name in the seq is bound to the corresponding offset in each value.
(create-bindings in values)
Inputs: [in :- [InSpec] values :- (s/cond-pre (s/protocol Storage) s/Any)] Returns: [(s/one (s/maybe Bindings) "The bindings for other params") (s/one (s/maybe StorageType) "The default storage")]
Converts user provided data for a query into bindings
Inputs: [in :- [InSpec] values :- (s/cond-pre (s/protocol Storage) s/Any)] Returns: [(s/one (s/maybe Bindings) "The bindings for other params") (s/one (s/maybe StorageType) "The default storage")] Converts user provided data for a query into bindings
(delete-from-graph graph data)
Inputs: [graph data :- Results]
Inputs: [graph data :- Results]
(disjunction graph part [_ & patterns])
Inputs: [graph part :- Results [_ & patterns]]
NOTE: This is a placeholder implementation. There is no optimization.
Inputs: [graph part :- Results [_ & patterns]] NOTE: This is a placeholder implementation. There is no optimization.
(filter-join graph part [[op & args :as fltr]])
Inputs: [graph part :- Results [[op & args :as fltr]] :- FilterPattern]
Uses row bindings in a partial result as arguments to a function whose parameters are defined by those names. Those rows whose bindings return true/truthy are kept and the remainder are removed.
Inputs: [graph part :- Results [[op & args :as fltr]] :- FilterPattern] Uses row bindings in a partial result as arguments to a function whose parameters are defined by those names. Those rows whose bindings return true/truthy are kept and the remainder are removed.
(gate-fn graph constraints)
Inputs: [graph constraints :- [Pattern]]
Returns a function that allows data through it or not, based on the results of a series of NOT operations. If any operation returns results, then nothing may get through.
Inputs: [graph constraints :- [Pattern]] Returns a function that allows data through it or not, based on the results of a series of NOT operations. If any operation returns results, then nothing may get through.
(join-patterns graph patterns bindings & options)
(join-patterns G__6470 G__6471 G__6472 & rest6473)
Inputs: [graph patterns :- [Pattern] bindings :- (s/maybe Bindings) & options] Returns: Results
Joins the resolutions for a series of patterns into a single result.
Inputs: [graph patterns :- [Pattern] bindings :- (s/maybe Bindings) & options] Returns: Results Joins the resolutions for a series of patterns into a single result.
(left-join pattern results graph)
Joins a partial result (on the left) to a pattern (on the right). The pattern type will determine dispatch.
Joins a partial result (on the left) to a pattern (on the right). The pattern type will determine dispatch.
(minus graph part [_ & [fpattern :as patterns]])
Inputs: [graph part :- Results [_ & [fpattern :as patterns]]]
Removes matches.
Inputs: [graph part :- Results [_ & [fpattern :as patterns]]] Removes matches.
(modify-pattern existing mapping pattern)
Inputs: [existing :- [Value] mapping :- #:s{Num s/Num} pattern :- EPVPattern] Returns: [s/Any]
Creates a new EPVPattern from an existing one, based on existing bindings. Uses the mapping to copy from columns in 'existing' to overwrite variables in 'pattern'. The variable locations have already been found and are in the 'mapping' argument
Inputs: [existing :- [Value] mapping :- #:s{Num s/Num} pattern :- EPVPattern] Returns: [s/Any] Creates a new EPVPattern from an existing one, based on existing bindings. Uses the mapping to copy from columns in 'existing' to overwrite variables in 'pattern'. The variable locations have already been found and are in the 'mapping' argument
(newl s & remaining)
(newl G__6509 & rest6510)
Inputs: [s :- (s/maybe s/Str) & remaining] Returns: s/Str
Inputs: [s :- (s/maybe s/Str) & remaining] Returns: s/Str
(outer-product leftb rightb)
Inputs: [leftb :- Bindings rightb :- Bindings] Returns: Bindings
Creates an outer product between 2 sets of bindings
Inputs: [leftb :- Bindings rightb :- Bindings] Returns: Bindings Creates an outer product between 2 sets of bindings
(pattern-left-join graph part pattern)
Inputs: [graph part :- Results pattern :- EPVPattern] Returns: Results
Takes a partial result, and does an inner join against the resolution of a pattern. Iterates over the partial result, using the bindings to update the pattern to search the index. Each row in the partial result is then repeated to match the rows returned from the index lookup. If no variables match, then the result will be an outer product of the partial result, and the rows returned from an index lookup of the unmodified pattern. The final result has metadata with the columns from the partial result, and all new vars from the pattern.
Inputs: [graph part :- Results pattern :- EPVPattern] Returns: Results Takes a partial result, and does an inner join against the resolution of a pattern. Iterates over the partial result, using the bindings to update the pattern to search the index. Each row in the partial result is then repeated to match the rows returned from the index lookup. If no variables match, then the result will be an outer product of the partial result, and the rows returned from an index lookup of the unmodified pattern. The final result has metadata with the columns from the partial result, and all new vars from the pattern.
(prebound-left-join part bindings)
Inputs: [part :- Results bindings :- Results] Returns: Results
Takes a bindings (Results) and joins on the current results. This is similar to the pattern-left-join but instead of taking a pattern to be applied to an indexed graph, it takes unindexed data that is already bound. The join is done by indexing the bindings and using the same algorithm that joins rows in pattern-left-join
Inputs: [part :- Results bindings :- Results] Returns: Results Takes a bindings (Results) and joins on the current results. This is similar to the pattern-left-join but instead of taking a pattern to be applied to an indexed graph, it takes unindexed data that is already bound. The join is done by indexing the bindings and using the same algorithm that joins rows in pattern-left-join
(query-validator {:keys [find in with where] :as query})
Inputs: [{:keys [find in with where], :as query} :- #:s{Keyword [s/Any]}]
Inputs: [{:keys [find in with where], :as query} :- #:s{Keyword [s/Any]}]
(run-simple-query graph [fpattern & patterns])
Inputs: [graph [fpattern & patterns] :- [PatternOrBindings]]
Inputs: [graph [fpattern & patterns] :- [PatternOrBindings]]
(select-planner options)
Inputs: [options]
Selects a query planner function, based on user-selected options
Inputs: [options] Selects a query planner function, based on user-selected options
(symb? s)
Inputs: [s]
Similar to symbol? but excludes the special ... form
Inputs: [s] Similar to symbol? but excludes the special ... form
(vconj c v)
Used to update a value to be a vector with the new element conj'ed. If the value starts as nil, then create a new vector to hold the element.
Used to update a value to be a vector with the new element conj'ed. If the value starts as nil, then create a new vector to hold the element.
(without e s)
Inputs: [e :- s/Any s :- [s/Any]] Returns: [s/Any]
Returns a sequence minus a specific element
Inputs: [e :- s/Any s :- [s/Any]] Returns: [s/Any] Returns a sequence minus a specific element
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close