Liking cljdoc? Tell your friends :D

com.wsscode.pathom3.format.eql

Helpers to manipulate EQL.

Helpers to manipulate EQL.
raw docstring

ast-contains-wildcard?clj/s

(ast-contains-wildcard? {:keys [children]})

Check if some of the AST children is the wildcard value, which is *.

Check if some of the AST children is the wildcard value, which is *.
sourceraw docstring

data->queryclj/s

(data->query data)

Helper function to transform a data into an output shape.

Helper function to transform a data into an output shape.
sourceraw docstring

extend-ast-with-wildcardclj/s

(extend-ast-with-wildcard source children)
source

ident-keyclj/s

(ident-key key)

When key is an ident, return the first part of it. Otherwise returns nil.

When key is an ident, return the first part of it. Otherwise returns nil.
sourceraw docstring

include-extra-attrsclj/s

(include-extra-attrs children attrs)
source

index-astclj/s

(index-ast {:keys [children]})
source

map-children->childrenclj/s

(map-children->children map-children)
source

map-selectclj/s

(map-select env source tx)

Starting from a map, do a EQL selection on that map. Think of this function as a power up version of select-keys.

Example: (p/map-select {:foo "bar" :deep {:a 1 :b 2}} [{:deep [:a]}]) => {:deep {:a 1}}

Starting from a map, do a EQL selection on that map. Think of this function as
a power up version of select-keys.

Example:
(p/map-select {:foo "bar" :deep {:a 1 :b 2}} [{:deep [:a]}])
=> {:deep {:a 1}}
sourceraw docstring

map-select-astclj/s

(map-select-ast {:com.wsscode.pathom3.format.eql/keys [map-select-include]
                 :as env}
                source
                ast)

Same as map-select, but using AST as source.

Same as map-select, but using AST as source.
sourceraw docstring

map-select-entryclj/s

(map-select-entry env source {:keys [key query type] :as ast})
source

maybe-merge-union-astclj/s

(maybe-merge-union-ast ast)

Check if AST entry is a union, if so it computes a new AST entry by combining all union paths as a single entry.

Check if AST entry is a union, if so it computes a new AST entry by combining
all union paths as a single entry.
sourceraw docstring

merge-ast-childrenclj/s

(merge-ast-children ast1 ast2)
source

pick-union-entryclj/s

(pick-union-entry ast m)

Check if ast children is a union type. If so, makes a decision to choose a path and return that AST.

Check if ast children is a union type. If so, makes a decision to choose a path and
return that AST.
sourceraw docstring

propclj/s

(prop k)
source

query-root-propertiesclj/s

(query-root-properties query)

Returns a vector with the properties at the root of the query.

For example:

(query-root-properties [{:a [:b]} :c]) => [:a :c]

In case the query is a union query, it will merge the roots of then will merge:

(query-root-properties {:foo [{:a [:b]} :c] :bar [:a :d]}) => [:a :c :d]

Returns a vector with the properties at the root of the query.

For example:

  (query-root-properties [{:a [:b]} :c])
  => [:a :c]

In case the query is a union query, it will merge the roots of then will merge:

  (query-root-properties {:foo [{:a [:b]} :c]
                          :bar [:a :d]})
  => [:a :c :d]
sourceraw docstring

recursive-query?clj/s

(recursive-query? query)
source

select-stats-dataclj/s

(select-stats-data x)

Filter X to keep only values that are relevant for running stats.

Filter X to keep only values that are relevant for running stats.
sourceraw docstring

seq-data->queryclj/s

(seq-data->query coll)
source

stats-value?clj/s

(stats-value? x)

Check if a value is a map with a run stats, or a sequence containing items with run stats

Check if a value is a map with a run stats, or a sequence containing items
with run stats
sourceraw docstring

union->rootclj/s

(union->root ast)

Convert a union entry to a root.

Convert a union entry to a root.
sourceraw docstring

union-childrenclj/s

(union-children ast)

Get union children when its an union, otherwise return nil.

Get union children when its an union, otherwise return nil.
sourceraw docstring

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-key-on-data?clj/s

(union-key-on-data? {:keys [union-key]} m)
source

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

× close