START-SQL-RECORDING — Start recording SQL commands or results.Function
type
One of the following keyword symbols: :commands, :results or :both, defaulting to :commands.
database
A database object. This will default to *default-database*.
Starts recording of SQL commands sent to and/or results
returned from database
which defaults to
*default-database*. The SQL is output on one or
more broadcast streams, initially just
*standard-output*, and the functions
add-sql-stream
and
delete-sql-stream
may be used to add or
delete command or result recording streams. The default value of
type
is :commands which
means that SQL commands sent to database
are recorded. If type
is
:results then SQL results returned from
database
are recorded. Both commands and
results may be recorded by passing type
value of :both.
(start-sql-recording :type :both) => (select [last-name] :from [employee] :where [= [emplid] 1] :field-names nil :flatp t) ;; 2004-07-02 16:42:12 dent/test/dent => SELECT last_name FROM employee WHERE (emplid = 1) ;; 2004-07-02 16:42:12 dent/test/dent <= (Lenin) => ("Lenin")