A SQL expression.
A non-negative integer or
A list of symbols.
returns a prepared-statement object for the SQL statement
in the database
can contain bind-variables in the form
is a positive integer.
If database is supplied, then the prepared-statement is associated with the database. Otherwise set-prepared-statement-variables will do the association even if it is called without a database.
:stringforces the variable to be passed to the database as a string. That may be useful if you have numeric values in Lisp which are stored as strings in the database.
:datecause an integer to be interpreted as a universal-time and be converted properly to an Oracle date.
If variable-types is not supplied, then the types will be chosen dynamically from the values passed to set-prepared-statement-variables.
flatp and result-types are interpreted the same as in select.
The result of
is a prepared-statement. This can be used by calling set-prepared-statement-variables to actually bind the variable, and then use one of the querying or executing interfaces that take a SQL expression argument: execute-command, query, do-query, simple-do-query, map-query and the
loop for...being each record
A prepared-statement that is associated with a database should be destroyed (by destroy-prepared-statement) before the database is closed, otherwise it may leak memory.
LispWorks User Guide and Reference Manual - 21 Dec 2011