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≠

clj
(apply-transform*
  ast
  m
  {:keys [rf vf node-key-fn]
   :or {rf (fn* [p1__2060# p2__2061#]
                (assoc p1__2060# (:key p2__2061#) (:value p2__2061#)))
        node-key-fn :dispatch-key
        vf :value}
   :as opts})
cljs
(apply-transform*
  ast
  m
  {:keys [rf vf node-key-fn]
   :or {rf (fn* [p1__4101# p2__4102#]
                (assoc p1__4101# (:key p2__4102#) (:value p2__4102#)))
        node-key-fn :dispatch-key
        vf :value}
   :as opts})

Returns a map created by recursively following paths that exist in the EQL ast and m. Takes an option map of the following keys. rf - Reducing function called for every kv in m. The function is passed the accumulated map and a map with the following keys. :key - the key in m :value - the value in m :node - the node at the path for the kv pair. node-key-fn - Function passed the AST node returning a unique identifier for the node at that position in the tree. Defaults to :dispatch-key. vf - Function passed the :key, :value, and :node and should return the value to be passed to rf.

Returns a map created by recursively following paths that exist in the EQL `ast`
and `m`. Takes an option map of the following keys.
  `rf` - Reducing function called for every kv in `m`. The function is passed
    the accumulated map and a map with the following keys.
      `:key` - the key in `m`
      `:value` - the value in `m`
      `:node` - the node at the path for the kv pair.
  `node-key-fn` - Function passed the AST node returning a unique identifier
    for the node at that position in the tree. Defaults to :dispatch-key.
  `vf` - Function passed the `:key`, `:value`, and `:node` and should return
    the value to be passed to `rf`.
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