In some cases it is necessary to build SQL-expressions dynamically under program control.
returns the SQL expression for an operator applied to its arguments. It also supports building SQL expressions which contain arbitrary SQL functions.
makes an SQL expression from the given keywords. This is equivalent to the first and third uses of the
syntax as discussed in The "[...]" Syntax.
returns the Lisp symbol for an SQL operator.
makes SQL out of the arguments supplied. Each argument to
is turned into SQL and then the
are concatenated with a single space between each pair. A Lisp string maps to the same characters enclosed between single quotes (this corresponds to an SQL string constant).
, that is, an SQL null value. Symbols and numbers map to strings. A list maps to a parenthesised, comma-separated expression. A vector maps to a comma-separated expression, which allows the easy generation of SQL lists that require no parentheses such as table lists in select statements.
The rules for the conversion via
are fully specified in the
LispWorks Reference Manual