workflo.query-engine.query.process

dispatch-key

(dispatch-key q)

Obtains the key to use for storing the results of processing the query q.

ident-expr?

(ident-expr? q)

Returns true if q is an ident expression.

ident-name

Returns the name of an ident expression.

ident-value

Returns the value of an ident expression.

join-expr?

(join-expr? q)

Returns true if q is a join expression.

join-query

(join-query q parent-qs)

Returns the query of a join query expression.

join-source

Returns the source of a join query expression.

param-expr?

(param-expr? q)

Returns true if q is a parameterized query expression.

param-map

Returns the parameter map of a parameterized query expression.

param-map-expr?

Returns true if q is a parameter map expression.

param-query

Returns the query of a parameterized query expression.

plain-query-expr?

(plain-query-expr? q)

Returns true if q is a plain query expression.

process

(process q parent-qs f init)

Processes a query. Takes in the initial value to merge the result into and calls f for every keyword, join and ident expression in the query in order to refine the result at the given level of the query.

process-ident

(process-ident ret q parent-qs params f)

Processes an ident expression. This calls f to obtain a result for the ident and stores the result in ret under the dispatch key of the ident (e.g. :account for an ident like [:account 1]).

process-join

(process-join ret q parent-qs params f)

Processes a join q with optional parameters against one or many instances of an entity (in ret).

process-join-query

(process-join-query ret q parent-qs params f)

Processes the query q of a join against one or more instances of an entity (in ret). Returns the result of proccessing the query for each of the instances. For instance, it may return the input instance(s) again but with the extra data from processing the join query inserted into each instance.

process-keyword

(process-keyword ret q parent-qs params f)

Processes a query keyword.

process-param-expr

(process-param-expr ret q parent-qs _ f)

Processes a parmeterized query expression by extracting the parameter map from it and passing them on to the processing of the contained plain query expression.

process-plain-query-expr

(process-plain-query-expr ret q parent-qs params f)

Processes a plain query expression.

process-query-expr

(process-query-expr ret q parent-qs _ f)

Processes a query expression (either plain or parameterized).

process-query-root

(process-query-root ret q parent-qs _ f)

Processes a query root expression.

query-expr?

(query-expr? q)

Returns true if q is a query expression.

query-root?

(query-root? q)

Returns true if q is a query root expression.

toplevel?

(toplevel? q parent-qs)

Returns true if the query q is at the top level, meaning it is either an immediate child of the root query or the child of a topevel parameterized query.