Liking cljdoc? Tell your friends :D

kwill.eql-plus

EQL helper functions.

Functions that take and return AST will be suffixed with a *. Functions without a * suffix tend to take and return EQL queries.

EQL helper functions.

Functions that take and return AST will be suffixed with a `*`. Functions
without a `*` suffix tend to take and return EQL queries.
raw docstring

apply-transformclj/s

(apply-transform query m opts)
See [[apply-transform*]].
raw docstring

apply-transform*clj/s

(apply-transform*
  ast
  m
  {:keys [rf node-key-fn] :or {node-key-fn :dispatch-key} :as opts})

Calls rf for every kv in m. Recursively follows paths when the path exists in ast. node-key-fn determines how a node is uniquely identified, defaulting to the node's :dispatch-key.

rf is passed the current accumulated map and a map of the following keys. :key - the key in m :value - the value in m :node - the node at the path for the kv pair.

Calls `rf` for every kv in m. Recursively follows paths when the path exists
in `ast`. `node-key-fn` determines how a node is uniquely identified, defaulting
to the node's `:dispatch-key`.

`rf` is passed the current accumulated map and a map of the following keys.
  `:key` - the key in `m`
  `:value` - the value in `m`
  `:node` - the node at the path for the kv pair.
raw docstring

ast->datomic-pullclj/s

(ast->datomic-pull ast)
(ast->datomic-pull ast
                   {:keys [select-params]
                    :or {select-params default-datomic-pull-select-params}})

datomic-pull->astclj/s

(datomic-pull->ast pull-pattern)
(datomic-pull->ast pull-pattern _)

datomic-pull->queryclj/s

(datomic-pull->query pull-pattern)
(datomic-pull->query pull-pattern opts)
See [[datomic-pull->ast]].
raw docstring

default-datomic-pull-select-paramsclj/s

(default-datomic-pull-select-params node)

Default select-params function used in ast->datomic-pull to select the Datomic keys from a node.

Default `select-params` function used in [[ast->datomic-pull]] to select
the Datomic keys from a node.
raw docstring

difference-queryclj/s

(difference-query source-query not-query)
See [[difference-query*]].
raw docstring

difference-query*clj/s

(difference-query* source-ast not-ast)

Filters source-ast by removing any paths in not-ast. Similar to a set difference.

Filters `source-ast` by removing any paths in `not-ast`. Similar to a set
difference.
raw docstring

map-selectclj/s

(map-select query m)
See [[map-select*]].
raw docstring

map-select*clj/s

(map-select* ast m)

Filters m by the ast. Similar to select-keys or Datomic pull.

Filters `m` by the `ast`. Similar to `select-keys` or Datomic pull. 
raw docstring

merge-many-queriesclj/s

(merge-many-queries queries)
(merge-many-queries queries opts)
See [[merge-many-queries*]].
raw docstring

merge-many-queries*clj/s

(merge-many-queries* asts)
(merge-many-queries* asts opts)

Merges many asts via merge-queries*.

Merges many `asts` via [[merge-queries*]].
raw docstring

merge-queriesclj/s

(merge-queries q1 q2)
(merge-queries q1 q2 opts)
See [[merge-queries*]].
raw docstring

merge-queries*clj/s

(merge-queries* ast1 ast2)
(merge-queries* ast1 ast2 {:keys [merge-params] :or {merge-params merge}})

Merges ast1 and ast2 node maps recursively. Similar to eql/merge-asts, but allows overriding default merge behaviors (e.g., EQL parameters get merged). Takes an options map with the following keys: :merge-params - a function taking two node params maps and returns a single, merged param map. Defaults to merge.

Merges `ast1` and `ast2` node maps recursively. Similar to eql/merge-asts, but
allows overriding default merge behaviors (e.g., EQL parameters get merged).
Takes an options map with the following keys:
  `:merge-params` - a function taking two node params maps and returns a single,
    merged param map. Defaults to `merge`.
raw docstring

query->datomic-pullclj/s

(query->datomic-pull query)
(query->datomic-pull query opts)
See [[ast->datomic-pull]].
raw docstring

splitclj/s

(split input-query range-query)

See split*.

See [[split*]].
raw docstring

split*clj/s

(split* input-ast range-ast)

Returns a tuple of ASTs where the first element does not contain any idents specified in range-ast, and the second element contains at most all the elements specified in range-ast.

Returns a tuple of ASTs where the first element does not contain any idents
specified in `range-ast`, and the second element contains at most all the
elements specified in `range-ast`.
raw docstring

top-level-keysclj/s

(top-level-keys query)
See [[top-level-keys*]].
raw docstring

top-level-keys*clj/s

(top-level-keys* ast)

Returns the top-level (children at root level) dispatch-key in ast.

Returns the top-level (children at root level) `dispatch-key` in `ast`.
raw docstring

transform-rename-rfclj/s

(transform-rename-rf {:keys [get-new-key]})

rf function for use with apply-transform* that renames map keys using data on the AST node.

rf function for use with [[apply-transform*]] that renames map keys using
data on the AST node.
raw docstring

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

× close