In some cases it is necessary to build SQL-expressions dynamically under program control.
. For examples see sql-operation.
The function sql-expression 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.
The function sql makes SQL out of the arguments supplied. Each argument to sql 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 are fully specified in sql.