Liking cljdoc? Tell your friends :D

edn-query-language.core


*shallow-conversion*clj/s

Dynamic var. When bound to true in the current thread calls to query->ast will no go past the first level of children. This is useful when you just want the AST for one layer of a query.

Dynamic var.  When bound to true in the current thread calls to query->ast will no go past the
first level of children.  This is useful when you just want the AST for one layer of a query.
sourceraw docstring

ast->exprclj/s

(ast->expr ast)
(ast->expr {:keys [type component] ast-meta :meta :as ast} unparse?)

Given a query expression AST convert it back into a query expression.

Given a query expression AST convert it back into a query expression.
sourceraw docstring

ast->queryclj/s

(ast->query query-ast)
source

call->astclj/s

(call->ast [f args :as call])
source

eql-astclj/s

(eql-ast eql-query-or-ast)

If param is a vector it assumes its an EEQL query and converts to AST. If its an map, it assumes its already and AST and returns as is. The implementation uses protocols for high performance dispatch.

If param is a vector it assumes its an EEQL query and converts to AST. If its an map,
it assumes its already and AST and returns as is. The implementation uses protocols
for high performance dispatch.
sourceraw docstring

expr->astclj/s

(expr->ast x)

Given a query expression convert it into an AST.

Given a query expression convert it into an AST.
sourceraw docstring

focus-subqueryclj/s

(focus-subquery query sub-query)

Given a query, focus it along the specified query expression.

Examples: (focus-query [:foo :bar :baz] [:foo]) => [:foo]

(fulcro.client.primitives/focus-query [{:foo [:bar :baz]} :woz] [{:foo [:bar]} :woz]) => [{:foo [:bar]} :woz]

Given a query, focus it along the specified query expression.

Examples:
  (focus-query [:foo :bar :baz] [:foo])
  => [:foo]

  (fulcro.client.primitives/focus-query [{:foo [:bar :baz]} :woz] [{:foo [:bar]} :woz])
  => [{:foo [:bar]} :woz]
sourceraw docstring

focus-subquery*clj/s

(focus-subquery* query-ast sub-ast)

Internal implementation of focus-subquery, you can use this function directly if you want to send AST in and get AST out (instead of query in / query out).

Internal implementation of focus-subquery, you can use this function directly if
you want to send AST in and get AST out (instead of query in / query out).
sourceraw docstring

focus-subquery-union*clj/s

(focus-subquery-union* query-ast sub-ast)
source

ident->astclj/s

(ident->ast [k id :as ref])
source

ident?clj/s

(ident? x)

Check if x is a EQL ident.

Check if x is a EQL ident.
sourceraw docstring

INCLUDE_SPECSclj/s

source (clj)source (cljs)

IProvideEQLAstclj/sprotocol

-eql-astclj/s

(-eql-ast this)
source

join->astclj/s

(join->ast join)
source

keyword->astclj/s

(keyword->ast k)
source

mask-queryclj/s

(mask-query source mask)

Given a source EQL query, use a mask EQL query to filter which elements to pick from the source. Params will be maintaned from the source, params in mask are ignored.

Given a source EQL query, use a mask EQL query to filter which elements to pick from
the source. Params will be maintaned from the source, params in mask are ignored.
sourceraw docstring

mask-query*clj/s

(mask-query* {:keys [children] :as source-ast} mask-ast)
source

merge-astsclj/s

(merge-asts qa qb)

Merges two ast's.

Merges two ast's.
sourceraw docstring

merge-queriesclj/s

(merge-queries qa qb)

Merges two queries

Merges two queries
sourceraw docstring

node-typeclj/smultimethod

source

normalize-query-variablesclj/s

(normalize-query-variables query)

Converts ident values and param values to ::p/var.

Converts ident values and param values to ::p/var.
sourceraw docstring

parameterizeclj/s

(parameterize expr params)
source

query->astclj/s

(query->ast query)

Convert a query to its AST representation.

Convert a query to its AST representation.
sourceraw docstring

query->ast1clj/s

(query->ast1 query-expr)

Call query->ast and return the first children.

Call query->ast and return the first children.
sourceraw docstring

query->shallow-astclj/s

(query->shallow-ast query)

Like query->ast, but does not follow joins. Useful for efficiently getting just the top-level entries in a large query.

Like query->ast, but does not follow joins.  Useful for efficiently getting just the top-level entries in
a large query.
sourceraw docstring

query-idclj/s

(query-id query)

Generates a consistent hash from the query. The query first goes to a process to remove any variables from idents and params, then we get the Clojure hash of it. You can use this to save information about a query that can be used to correlate with the query later.

Generates a consistent hash from the query. The query first goes to a process to remove any
variables from idents and params, then we get the Clojure hash of it. You can use this to save
information about a query that can be used to correlate with the query later.
sourceraw docstring

symbol->astclj/s

(symbol->ast k)
source

transduce-childrenclj/s

(transduce-children xform {:keys [children] :as node})

Recursivelly transduce children on the AST, you can use this to apply filter/transformations on a whole AST. Each iteration of the transducer will get a single AST node to process.

(->> [:a {:b [:c :d]} :e]
     (p/query->ast)
     (p/transduce-children (remove (comp #{:a :c} :key)))
     (p/ast->query))
; => [{:b [:d]} :e]
Recursivelly transduce children on the AST, you can use this to apply filter/transformations
on a whole AST. Each iteration of the transducer will get a single AST node to process.

```
(->> [:a {:b [:c :d]} :e]
     (p/query->ast)
     (p/transduce-children (remove (comp #{:a :c} :key)))
     (p/ast->query))
; => [{:b [:d]} :e]
```
sourceraw docstring

union->astclj/s

(union->ast m)
source

union-children?clj/s

(union-children? ast)

Given an AST point, check if the children is a union query type.

Given an AST point, check if the children is a union query type.
sourceraw docstring

union-entry->astclj/s

(union-entry->ast [k v])
source

update-property-paramclj/s

(update-property-param x f & args)

Add property param, eg:

(p/update-property-param :keyword assoc :foo "bar") => (:keyword {:foo "bar"})
(p/update-property-param '(:keyword {:param "prev"}) assoc :foo "bar") => (:keyword {:foo "bar" :param "prev"})
Add property param, eg:

```
(p/update-property-param :keyword assoc :foo "bar") => (:keyword {:foo "bar"})
(p/update-property-param '(:keyword {:param "prev"}) assoc :foo "bar") => (:keyword {:foo "bar" :param "prev"})
```
sourceraw docstring

wrap-exprclj/s

(wrap-expr root? expr)
source

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

× close