ADD-SQL-STREAM — Add a component to the broadcast streams used for recording SQL commands or results.Function
stream
A stream or T.
typeOne of the following keyword symbols: :commands, :results or :both, defaulting to :commands.
databaseA database object. This will default to *default-database*.
resultThe added stream.
Adds the supplied stream stream (or
T for *standard-output*) as a component of
the recording broadcast stream for the SQL recording type
specified by type on
database which defaults to
*default-database*. type
must be one of :commands,
:results, or :both, defaulting
to :commands, depending on whether the stream
is to be added for recording SQL commands, results or both.
(start-sql-recording :type :commands)
=>
(with-output-to-string (s)
(add-sql-stream s :type :commands)
(print-query [select [emplid] [first-name] [last-name] [email] :from [employee]]
:stream s))
;; 2004-07-02 17:38:45 dent/test/dent => SELECT emplid,first_name,last_name,email FROM employee
=>
";; 2004-07-02 17:38:45 dent/test/dent => SELECT emplid,first_name,last_name,email FROM employee
1 Vladimir Lenin lenin@soviet.org
2 Josef Stalin stalin@soviet.org
3 Leon Trotsky trotsky@soviet.org
4 Nikita Kruschev kruschev@soviet.org
5 Leonid Brezhnev brezhnev@soviet.org
6 Yuri Andropov andropov@soviet.org
7 Konstantin Chernenko chernenko@soviet.org
8 Mikhail Gorbachev gorbachev@soviet.org
9 Boris Yeltsin yeltsin@soviet.org
10 Vladimir Putin putin@soviet.org "