Returns a prepared-statement object for a sql-exp in a database.
A SQL expression.
A non-negative integer or
A list of symbols.
prepare-statement returns a prepared-statement object for the SQL statement sql-exp in the database database. sql-exp can contain bind-variables in the form
:n where n is a positive integer.
: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. This is not supported on SQLite databases, which do not support date fields.
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
prepare-statement is a prepared-statement. This can be used by calling set-prepared-statement-variables to actually bind the variables, 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 construct.
Create a prepared-statement for a SQL expression:
LispWorks User Guide and Reference Manual - 20 Sep 2017