Utilities for querying tools.analyzer ASTs with Datomic
Utilities for querying tools.analyzer ASTs with Datomic
(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.
(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.
(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.
(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.
(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 in {: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 in {:where [[(dec ?foo) ?1234] [(inc ?1234) ?bar] ..] ..}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close