Liking cljdoc? Tell your friends :D

clojure.tools.analyzer.ast.query

Utilities for querying tools.analyzer ASTs with Datomic

Utilities for querying tools.analyzer ASTs with Datomic
raw docstring

dbclj

(db asts)

Given a list of ASTs, returns a representation of those that can be used as a database in a Datomic Datalog query.

Given a list of ASTs, returns a representation of those
that can be used as a database in a Datomic Datalog query.
sourceraw docstring

qclj

(q query asts & inputs)

Execute a Datomic Datalog query against the ASTs. The first input is always assumed to be an AST database, if more are required, it's required to call db on them. unfold-expression-clauses is automatically applied to the query.

Execute a Datomic Datalog query against the ASTs.
The first input is always assumed to be an AST database, if more
are required, it's required to call `db` on them.
`unfold-expression-clauses` is automatically applied to the
query.
sourceraw docstring

query-mapclj

(query-map query)

Transforms a Datomic query from its vector representation to its map one. If the given query is already in its map representation, the original query is returned.

Transforms a Datomic query from its vector representation to its map one.
If the given query is already in its map representation, the original query
is returned.
sourceraw docstring

resolve-callsclj

(resolve-calls query)

Automatically replace fn name symbols in expression clauses with their namespace qualified one if the symbol can be resolved in the current namespace.

Automatically replace fn name symbols in expression clauses with
their namespace qualified one if the symbol can be resolved in the
current namespace.
sourceraw docstring

unfold-expression-clausesclj

(unfold-expression-clauses query)

Given a Datomic query, walk the :where clauses searching for expression clauses with nested calls, unnesting those calls.

E.g {:where [[(inc (dec ?foo)) ?bar] ..] ..} will be transformed into {:where [[(dec ?foo) ?1234] [(inc ?1234) ?bar] ..] ..}

Given a Datomic query, walk the :where clauses searching for
expression clauses with nested calls, unnesting those calls.

E.g {:where [[(inc (dec ?foo)) ?bar] ..] ..} will be transformed into
{:where [[(dec ?foo) ?1234] [(inc ?1234) ?bar] ..] ..}
sourceraw docstring

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

× close