(call-next-method)))))
(defmethod output-sql ((expr sql-ident) database)
- (with-slots (name)
- expr
+ (with-slots (name) expr
(write-string
(convert-to-db-default-case
(etypecase name
(with-slots (into attributes values query)
ins
(write-string "INSERT INTO " *sql-stream*)
- (output-sql into database)
+ (output-sql
+ (typecase into
+ (string (sql-expression :attribute into))
+ (t into))
+ database)
(when attributes
(write-char #\Space *sql-stream*)
(output-sql attributes database))
(write-char #\Space *sql-stream*)
(write-string
(if (stringp db-type) db-type ; override definition
- (database-get-type-specifier (car type) (cdr type) database))
+ (database-get-type-specifier (car type) (cdr type) database
+ (database-underlying-type database)))
*sql-stream*)
(let ((constraints (database-constraint-statement
(if (and db-type (symbolp db-type))