Liking cljdoc? Tell your friends :D

naga.storage.memory.core

A storage implementation over in-memory indexing. Includes full query engine.

A storage implementation over in-memory indexing. Includes full query engine.
raw docstring

add-to-graphclj

(add-to-graph graph data)

Inputs: [graph data :- Results]

Inputs: [graph data :- Results]
sourceraw docstring

Constraintcljprotocol

get-varsclj

(get-vars c)

Returns a seq of the vars in a constraint

Returns a seq of the vars in a constraint

left-joinclj

(left-join c r g)

Left joins a constraint onto a result. Arguments in reverse order to dispatch on constraint type

Left joins a constraint onto a result. Arguments in reverse order to dispatch on constraint type
source

create-storeclj

(create-store config)

Inputs: [config] Returns: Storage

Factory function to create a store

Inputs: [config]
Returns: Storage

Factory function to create a store
sourceraw docstring

empty-storeclj

source

epv-pattern?clj

source

filter-joinclj

(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

filter-pattern?clj

source

find-startclj

(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

first-groupclj

source

first-group*clj

(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-count-fnclj

(get-count-fn graph)

Returns a memoized counting function for the current graph. These functions only last as long as the current graph.

Returns a memoized counting function for the current graph.
These functions only last as long as the current graph.
sourceraw docstring

join-patternsclj

(join-patterns graph patterns & options)

Inputs: [graph patterns :- [Pattern] & options] Returns: Results

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

Inputs: [graph patterns :- [Pattern] & options]
Returns: Results

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

merge-filtersclj

(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

min-join-pathclj

(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

modify-patternclj

(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

pathsclj

(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-left-joinclj

(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

(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

select-plannerclj

(select-planner options)

Inputs: [options]

Selects a query planner function

Inputs: [options]

Selects a query planner function
sourceraw docstring

user-planclj

(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

withoutclj

(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