X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fexpressions.lisp;h=16bf687567ebc75e7dec65ed895ed5de92fda40b;hp=8b6167ba2c71f22ba288835e0699a04f554d9431;hb=4332610851d855ebc858f231f06cff81c675e5f2;hpb=b50166ae0ba2bc09a9094c0e675ec92010b7293e diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 8b6167b..16bf687 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -1111,17 +1111,20 @@ uninclusive, and the args from that keyword to the end." )) (defmethod database-constraint-statement (constraint-list database) - (declare (ignore database)) - (make-constraints-description constraint-list)) + (make-constraints-description constraint-list database)) + +(defmethod database-translate-constraint (constraint database) + (assoc (symbol-name constraint) + *constraint-types* + :test #'equal)) -(defun make-constraints-description (constraint-list) +(defun make-constraints-description (constraint-list database) (if constraint-list (let ((string "")) (do ((constraint constraint-list (cdr constraint))) ((null constraint) string) - (let ((output (assoc (symbol-name (car constraint)) - *constraint-types* - :test #'equal))) + (let ((output (database-translate-constraint (car constraint) + database))) (if (null output) (error 'sql-user-error :message (format nil "unsupported column constraint '~A'"