From: Marcus Pearce Date: Tue, 6 Jul 2004 10:14:07 +0000 (+0000) Subject: r9736: fix bug preventing the :DB-CONSTRAINTS View Class slot option accepting a... X-Git-Tag: v3.8.6~296 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=d0b5c8c2a14929792d2d5818b57db27cae4484b2;hp=f7a356bb4c11d062eeeb5d4aaf4e187a3cb15a27 r9736: fix bug preventing the :DB-CONSTRAINTS View Class slot option accepting a list of constraints [reported by Travis Cross]. --- diff --git a/ChangeLog b/ChangeLog index fee7194..3dba7ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +6 Jul 2004 Marcus Pearce + * sql/expressions.lisp: add AUTO-INCREMENT and UNIQUE to the + recognised column constraints for CREATE-TABLE and the :DB-CONSTRAINTS + View Class slot option. + * sql/ooddl.lisp: fix bug preventing the :DB-CONSTRAINTS View Class + slot option accepting a list of constraints [reported by Travis Cross]. + 3 Jul 2004 Marcus Pearce * doc/appendix.xml: add notes about idiosyncrasies/unsupported features and so on the documentation for each backend. diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 50aa5d1..ace3603 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -841,7 +841,9 @@ uninclusive, and the args from that keyword to the end." (cons (symbol-name-default-case "NOT") "NOT") (cons (symbol-name-default-case "NULL") "NULL") (cons (symbol-name-default-case "PRIMARY") "PRIMARY") - (cons (symbol-name-default-case "KEY") "KEY"))) + (cons (symbol-name-default-case "KEY") "KEY") + (cons (symbol-name-default-case "AUTO-INCREMENT") "AUTO_INCREMENT") + (cons (symbol-name-default-case "UNIQUE") "UNIQUE"))) ;; ;; Convert type spec to sql syntax diff --git a/sql/ooddl.lisp b/sql/ooddl.lisp index 610da26..d44f022 100644 --- a/sql/ooddl.lisp +++ b/sql/ooddl.lisp @@ -121,7 +121,7 @@ in DATABASE which defaults to *DEFAULT-DATABASE*." (setf cdef (append cdef (list (view-class-slot-db-type slotdef)))) (let ((const (view-class-slot-db-constraints slotdef))) (when const - (setq cdef (append cdef (list const))))) + (setq cdef (append cdef (listify const))))) cdef)))