X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fsql.lisp;h=21f5371b905685dd5e092914bc8491d44148b77b;hb=a223800f208347e8a07f597648fcdb6c05ec5afe;hp=8cf7758263c04133f7a864bca783af375ea40ca5;hpb=fe9654a9f2c7db4f13f4db58bcd357fc22c634b4;p=clsql.git diff --git a/sql/sql.lisp b/sql/sql.lisp index 8cf7758..21f5371 100644 --- a/sql/sql.lisp +++ b/sql/sql.lisp @@ -38,6 +38,9 @@ (clsql-base-sys::signal-no-database-error database)) (unless (is-database-open database) (database-reconnect database)) + (when (db-type-has-views? (database-underlying-type database)) + (dolist (view (list-views :database database)) + (drop-view view :database database))) (dolist (table (list-tables :database database)) (drop-table table :database database)) (dolist (index (list-indexes :database database)) @@ -217,6 +220,10 @@ condition is true." (declare (ignore database)) (db-timestring self)) +(defmethod database-output-sql ((self duration) database) + (declare (ignore database)) + (format nil "'~a'" (duration-timestring self))) + (defmethod database-output-sql (thing database) (if (or (null thing) (eq 'null thing))