Liking cljdoc? Tell your friends :D

asami.query

Implements a full query engine based on fully indexed data.

Implements a full query engine based on fully indexed data.
raw docstring

*plan-options*clj/s

source

add-to-graphclj/s

(add-to-graph graph data)

Inputs: [graph data :- Results]

Inputs: [graph data :- Results]
sourceraw docstring

binding-joinclj/s

(binding-join graph part [expr bnd-var])

Inputs: [graph part :- Results [expr bnd-var] :- FilterPattern]

Binds a var and adds to results.

Inputs: [graph part :- Results [expr bnd-var] :- FilterPattern]

Binds a var and adds to results.
sourceraw docstring

Bindingsclj/s

source

bindings?clj/s

(bindings? b)
source

create-bindingclj/s

(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.
sourceraw docstring

create-bindingsclj/s

(create-bindings in values)

Inputs: [in :- [InSpec] values :- (s/cond-pre (s/protocol Storage) s/Any)] Returns: [(s/one 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 Bindings "The bindings for other params") (s/one (s/maybe StorageType) "The default storage")]

Converts user provided data for a query into bindings
sourceraw docstring

delete-from-graphclj/s

(delete-from-graph graph data)

Inputs: [graph data :- Results]

Inputs: [graph data :- Results]
sourceraw docstring

disjunctionclj/s

(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.
sourceraw docstring

filter-joinclj/s

(filter-join graph part [fltr])

Inputs: [graph part :- Results [fltr] :- FilterPattern]

Filters down results.

Inputs: [graph part :- Results [fltr] :- FilterPattern]

Filters down results.
sourceraw docstring

find-startclj/s

(find-start pattern-counts patterns)

Inputs: [pattern-counts :- {EPVPattern s/Num} patterns :- [EPVPattern]] Returns: EPVPattern

Returns the first pattern with the smallest count

Inputs: [pattern-counts :- {EPVPattern s/Num} patterns :- [EPVPattern]]
Returns: EPVPattern

Returns the first pattern with the smallest count
sourceraw docstring

find-varsclj/s

(find-vars f)

Inputs: [f]

Inputs: [f]
sourceraw docstring

first-groupclj/s

source

first-group*clj/s

(first-group* [fp & rp])

Inputs: [[fp & rp] :- [Pattern]] Returns: [(s/one [Pattern] "group") (s/one [Pattern] "remainder")]

Finds a group from a sequence of patterns. A group is defined by every pattern sharing at least one var with at least one other pattern. Returns a pair. The first returned element is the Patterns in the group, the second is what was left over.

Inputs: [[fp & rp] :- [Pattern]]
Returns: [(s/one [Pattern] "group") (s/one [Pattern] "remainder")]

Finds a group from a sequence of patterns. A group is defined by every pattern
 sharing at least one var with at least one other pattern. Returns a pair.
 The first returned element is the Patterns in the group, the second is what was left over.
sourceraw docstring

get-varsclj/s

(get-vars pattern)

Returns all vars used by a pattern

Returns all vars used by a pattern
sourceraw docstring

InSpecclj/s

source

join-patternsclj/s≠

clj
(join-patterns graph patterns bindings & options)
cljs
(join-patterns G__3415 G__3416 G__3417 & rest3418)

Inputs: [graph patterns :- [Pattern] bindings :- [[s/Any]] & options] Returns: Results

Joins the resolutions for a series of patterns into a single result.

Inputs: [graph patterns :- [Pattern] bindings :- [[s/Any]] & options]
Returns: Results

Joins the resolutions for a series of patterns into a single result.
sourceraw docstring

left-joinclj/s

(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.
sourceraw docstring

merge-filtersclj/s

(merge-filters epv-patterns filter-patterns)

Inputs: [epv-patterns filter-patterns]

Merges filters into the sequence of patterns, so that they appear as soon as all their variables are first bound

Inputs: [epv-patterns filter-patterns]

Merges filters into the sequence of patterns, so that they appear
 as soon as all their variables are first bound
sourceraw docstring

merge-opsclj/s

(merge-ops patterns op-patterns)

Inputs: [patterns op-patterns]

Merges operator patterns into the sequence of patterns, so that they appear as soon as all their variables are first bound

Inputs: [patterns op-patterns]

Merges operator patterns into the sequence of patterns, so that they appear
 as soon as all their variables are first bound
sourceraw docstring

min-join-pathclj/s

(min-join-path patterns count-map)

Inputs: [patterns :- [Pattern] count-map :- {EPVPattern s/Num}] Returns: [EPVPattern]

Calculates a plan based on no outer joins (a cross product), and minimized joins. A plan is the order in which to evaluate constraints and join them to the accumulated evaluated data. If it is not possible to create a path without a cross product, then return a plan of the patterns in the provided order.

Inputs: [patterns :- [Pattern] count-map :- {EPVPattern s/Num}]
Returns: [EPVPattern]

Calculates a plan based on no outer joins (a cross product), and minimized joins.
 A plan is the order in which to evaluate constraints and join them to the accumulated
 evaluated data. If it is not possible to create a path without a cross product,
 then return a plan of the patterns in the provided order.
sourceraw docstring

minusclj/s

(minus graph part [_ & patterns])

Inputs: [graph part :- Results [_ & patterns]]

Removes matches.

Inputs: [graph part :- Results [_ & patterns]]

Removes matches.
sourceraw docstring

modify-patternclj/s

(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
sourceraw docstring

op-errorclj/s

(op-error pattern)
source

operatorsclj/s

source

outer-productclj/s

(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
sourceraw docstring

pathsclj/s

(paths patterns pattern-counts)

Inputs: [patterns :- [EPVPattern] pattern-counts :- {EPVPattern s/Num}] Returns: [[EPVPattern]]

Returns a seq of all paths through the constraints. A path is defined by new patterns containing at least one variable common to the patterns that appeared before it. Patterns must form a group.

Inputs: [patterns :- [EPVPattern] pattern-counts :- {EPVPattern s/Num}]
Returns: [[EPVPattern]]

Returns a seq of all paths through the constraints. A path is defined
 by new patterns containing at least one variable common to the patterns
 that appeared before it. Patterns must form a group.
sourceraw docstring

pattern-errorclj/s

(pattern-error pattern)
source

pattern-left-joinclj/s

(pattern-left-join graph part pattern)

Inputs: [graph part :- Results pattern :- EPVPattern] Returns: Results

Takes a partial result, and joins on the resolution of a pattern

Inputs: [graph part :- Results pattern :- EPVPattern]
Returns: Results

Takes a partial result, and joins on the resolution of a pattern
sourceraw docstring

plan-pathclj/s

(plan-path graph patterns options)

Inputs: [graph patterns :- [Pattern] options] Returns: [(s/one [Pattern] "Patterns in planned order") (s/one {EPVPattern Results} "Single patterns mapped to their resolutions")]

Determines the order in which to perform the elements that go into a query. Tries to optimize, so it uses the graph to determine some of the properties of the query elements. Options can describe which planner to use. Planning will determine the resolution map, and this is returned with the plan. By default the min-join-path function is used. This can be overriden with options: [:planner plan] The plan can be one of :user, :min. :min is the default. :user means to execute in provided order.

Inputs: [graph patterns :- [Pattern] options]
Returns: [(s/one [Pattern] "Patterns in planned order") (s/one {EPVPattern Results} "Single patterns mapped to their resolutions")]

Determines the order in which to perform the elements that go into a query.
 Tries to optimize, so it uses the graph to determine some of the
 properties of the query elements. Options can describe which planner to use.
 Planning will determine the resolution map, and this is returned with the plan.
 By default the min-join-path function is used. This can be overriden with options:
   [:planner plan]
 The plan can be one of :user, :min.
 :min is the default. :user means to execute in provided order.
sourceraw docstring

prebound-left-joinclj/s

(prebound-left-join part bindings)

Inputs: [part :- Results bindings :- Results] Returns: Results

Takes a bindings (Results) and joins on the current results

Inputs: [part :- Results bindings :- Results]
Returns: Results

Takes a bindings (Results) and joins on the current results
sourceraw docstring

query-mapclj/s

(query-map query)

Inputs: [query]

Inputs: [query]
sourceraw docstring

select-plannerclj/s

(select-planner options)

Inputs: [options]

Selects a query planner function

Inputs: [options]

Selects a query planner function
sourceraw docstring

symb?clj/s

(symb? s)

Inputs: [s]

Similar to symbol? but excludes the special ... form

Inputs: [s]

Similar to symbol? but excludes the special ... form
sourceraw docstring

user-planclj/s

(user-plan patterns _)

Inputs: [patterns :- [EPVPattern] _ :- {EPVPattern s/Num}] Returns: [EPVPattern]

Returns the original path specified by the user

Inputs: [patterns :- [EPVPattern] _ :- {EPVPattern s/Num}]
Returns: [EPVPattern]

Returns the original path specified by the user
sourceraw docstring

vconjclj/s

(vconj c v)
source

withoutclj/s

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close