X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fexpressions.lisp;h=fd04d42ee8c09039e39f7ea35138e35f103ddce8;hb=4a30248613bca9864145306a00bb801cf5348017;hp=b54029e4b727121c4d299ab888f00cd4f5950eb6;hpb=709d415122d04713da58a7c6d7ee10162c386a56;p=clsql.git diff --git a/sql/expressions.lisp b/sql/expressions.lisp index b54029e..fd04d42 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -1,8 +1,6 @@ ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; -;;;; $Id$ -;;;; ;;;; Classes defining SQL expressions and methods for formatting the ;;;; appropriate SQL commands. ;;;; @@ -982,6 +980,7 @@ uninclusive, and the args from that keyword to the end." (cons (symbol-name-default-case "UNSIGNED") "UNSIGNED") (cons (symbol-name-default-case "ZEROFILL") "ZEROFILL") (cons (symbol-name-default-case "AUTO-INCREMENT") "AUTO_INCREMENT") + (cons (symbol-name-default-case "DEFAULT") "DEFAULT") (cons (symbol-name-default-case "UNIQUE") "UNIQUE"))) (defmethod database-constraint-statement (constraint-list database) @@ -1001,6 +1000,9 @@ uninclusive, and the args from that keyword to the end." :message (format nil "unsupported column constraint '~A'" constraint)) (setq string (concatenate 'string string (cdr output)))) + (when (equal (symbol-name (car constraint)) "DEFAULT") + (setq constraint (cdr constraint)) + (setq string (concatenate 'string string " " (car constraint)))) (if (< 1 (length constraint)) (setq string (concatenate 'string string " "))))))))