A storage implementation over in-memory indexing. Includes full query engine.
A storage implementation over in-memory indexing. Includes full query engine.
(add-to-graph graph data)
Inputs: [graph data :- Results]
Inputs: [graph data :- Results]
(get-vars c)
Returns a seq of the vars in a constraint
Returns a seq of the vars in a constraint
(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
(create-store config)
Inputs: [config] Returns: Storage
Factory function to create a store
Inputs: [config] Returns: Storage Factory function to create a store
(filter-join graph part fltr)
Inputs: [graph part :- Results fltr :- FilterPattern]
Filters down results.
Inputs: [graph part :- Results fltr :- FilterPattern] Filters down results.
(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
(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.
(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.
(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.
(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
(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.
(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
(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.
(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
(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.
(select-planner options)
Inputs: [options]
Selects a query planner function
Inputs: [options] Selects a query planner function
(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
(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