Class Simple-Query-Builder

Part of:

package cl-perec, class query-builder, class query

Direct Superclass

query
query-builder

Slot

actionInitform:collect, Initargs::action; Accessors:action-of; Type:(member collect purge).
action-args
List of expressions of the action form.
Initargs::action-args; Accessors:action-args-of; Type:list.
asserts
List of conditions of assert forms.
Initargs::asserts; Accessors:asserts-of; Type:list.
current-query-variableInitargs::current-query-variable; Accessors:current-query-variable-of.
flatpInitargs::flatp; Accessors:flatp; Type:boolean.
group-by
List of slot values.
Initargs::group-by; Accessors:group-by-of; Type:list.
havingInitargs::having; Accessors:having-of; Type:list.
lexical-variablesInitargs::lexical-variables; Accessors:lexical-variables-of; Type:list.
order-by
Format: (:ascending :descending ...)
Initargs::order-by; Accessors:order-by-of; Type:list.
prefetch-modeInitform:all, Initargs::prefetch-mode; Accessors:prefetch-mode-of; Type:(member none accessed all).
query-variablesInitargs::query-variables; Accessors:query-variables-of; Type:list.
result-typeInitform:'list, Initargs::result-type; Accessors:result-type-of; Type:(member 'list 'scroll).
sql-order-by
Format: (:ascending :descending ...)
Initargs::sql-order-by; Accessors:sql-order-by-of; Type:list.
sql-select-listInitargs::sql-select-list; Accessors:sql-select-list-of.
sql-whereInitargs::sql-where; Accessors:sql-where-of.
uniquepInitargs::uniquep; Accessors:uniquep; Type:boolean.

Direct Method

add-assertAdd an assert for the CONDITION form to the QUERY.
add-collectAdd a collect for the EXPRESSION form to the QUERY.
add-order-byAdd an order-by clause specified by EXPRESSION and DIRECTION to the QUERY.

Other Method

%compile-queryCompiles the query with the specified compiler.
add-group-byAdd a group-by clause specified by EXPRESSION to the QUERY.
add-havingAdd a having condition specified by EXPRESSION to the QUERY.
add-lexical-variableAdd a lexical variable named VARIABLE to the QUERY.
Lexical variables can be referenced in the as...
add-query-variableAdd a query variable named VARIABLE to the QUERY.
Query variables can be referenced in the assert...
add-where-clause
collects-of
compile-queryCompiles the query to lisp code that executes the query.
emit-queryTODO
flatp
generate-planGenerates a PLAN for the QUERY.
macroexpand-queryExpands macros in the body of the query.
options-of
select-form-of
set-order-bySet an order-by clause specified by EXPRESSION and DIRECTION to the QUERY.
setfcollects-of
sql-select-list-for
sql-table-references-for
transform-queryTODO