X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fsql.lisp;h=c80723b24dd8a5b7b1d2622c1e0b5fbee258191e;hb=ddae27a4c55b8a055afc167bd7d65c766cc6c78e;hp=6bc454724621bf4adbbc76ddfdbae63caff5b9a3;hpb=e303385b84c6246c7d60ebd95d764a282a181a23;p=clsql.git diff --git a/sql/sql.lisp b/sql/sql.lisp index 6bc4547..c80723b 100644 --- a/sql/sql.lisp +++ b/sql/sql.lisp @@ -48,6 +48,8 @@ (signal-no-database-error database)) (unless (is-database-open database) (database-reconnect database)) + (when (eq :oracle (database-type database)) + (ignore-errors (execute-command "PURGE RECYCLEBIN" :database database))) (when (db-type-has-views? (database-underlying-type database)) (dolist (view (list-views :database database)) (drop-view view :database database))) @@ -120,7 +122,7 @@ table INTO. The default value of DATABASE is *DEFAULT-DATABASE*." (av-pairs nil) (subquery nil)) (unless into - (error 'clsql-sql-syntax-error :reason ":into keyword not supplied")) + (error 'sql-user-error :message ":into keyword not supplied")) (let ((insert (make-instance 'sql-insert :into into))) (with-slots (attributes values query) insert @@ -138,8 +140,8 @@ table INTO. The default value of DATABASE is *DEFAULT-DATABASE*." (setf attributes attrs) (setf query subquery)) (t - (error 'clsql-sql-syntax-error - :reason "bad or ambiguous keyword combination."))) + (error 'sql-user-error + :message "bad or ambiguous keyword combination."))) insert))) (defun delete-records (&key (from nil) @@ -243,10 +245,11 @@ condition is true." (if (or (null thing) (eq 'null thing)) "NULL" - (error 'clsql-simple-error - :format-control - "No type conversion to SQL for ~A is defined for DB ~A." - :format-arguments (list (type-of thing) (type-of database))))) + (error 'sql-user-error + :message + (format nil + "No type conversion to SQL for ~A is defined for DB ~A." + (type-of thing) (type-of database))))) (defmethod output-sql-hash-key ((arg vector) database)