X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Frecording.lisp;h=4d0810af00a4f09e57a3de03d87146631d798494;hp=8bff3352442835d5d4a38038f5f9887586c6dc69;hb=e567409d9fff3f7231c2a0bb69b345e19de2b246;hpb=215ec41559dda52d46539d48a0aa390811c2423c diff --git a/sql/recording.lisp b/sql/recording.lisp index 8bff335..4d0810a 100644 --- a/sql/recording.lisp +++ b/sql/recording.lisp @@ -50,7 +50,7 @@ by passing TYPE value of :both." (defun sql-recording-p (&key (type :commands) (database *default-database*)) "Predicate to test whether the SQL recording specified by TYPE -is currently enabled for DATABASE which defaults to *DEFAULT-DATABASE*. +is currently enabled for DATABASE which defaults to *DEFAULT-DATABASE*. TYPE may be one of :commands, :results, :both or :either, defaulting to :commands, otherwise nil is returned." (when (or (and (eq type :commands) @@ -88,7 +88,7 @@ both." (cons stream (list-sql-streams :type :results :database database)))))) stream) - + (defun delete-sql-stream (stream &key (type :commands) (database *default-database*)) "Removes the supplied stream STREAM from the recording broadcast @@ -142,12 +142,12 @@ returned is that used for recording SQL commands or results." (result-recording-stream database)) (t (error "Unknown recording type. ~A" type)))) - + (defun record-sql-command (expr database) (when database (with-slots (command-recording-stream) database - (when command-recording-stream + (when command-recording-stream (format command-recording-stream "~&;; ~A ~A => ~A~%" (iso-timestring (get-time)) (database-name database) @@ -157,11 +157,11 @@ returned is that used for recording SQL commands or results." (when database (with-slots (result-recording-stream) database - (when result-recording-stream + (when result-recording-stream (format result-recording-stream "~&;; ~A ~A <= ~A~%" (iso-timestring (get-time)) (database-name database) res))))) - +