(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)))
(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
(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)
(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)