+02 Dec 2005 Kevin Rosenberg <kevin@rosenberg.net>
+ * sql/generic-postgresql.lisp: improved decoding of table attribute
+ parameters [from Vladimir Sekissov]
+ * sql/metaclasses.lisp: check that metaclass is standard-db-class or
+ it's subclass to prevent adding standard-db-object to supers if
+ somebody in the path has it already when metaclass inherited from
+ standard-db-class. [from Vladimir Sekissov]
+
26 Nov 2005 Kevin Rosenberg <kevin@rosenberg.net>
* Version 3.5.0
* tests/test-init.lisp, tests/test-fddl.lisp, tests/test-fdml.lisp,
for MYSQL structure. This will make the code more robust in
the event that MySQL library changes the size of the mysql-mysql
structure.
-
-
+cl-sql (3.5.1-1) unstable; urgency=low
+
+ * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Fri, 2 Dec 2005 08:19:30 -0700
+
cl-sql (3.5.0-1) unstable; urgency=low
* New upstream (closes: 339842)
(owner-clause owner))
database nil nil))))
(when row
- (values
- (ensure-keyword (first row))
- (if (string= "-1" (second row))
- (- (parse-integer (third row) :junk-allowed t) 4)
- (parse-integer (second row)))
- nil
- (if (string-equal "f" (fourth row))
- 1
- 0)))))
+ (destructuring-bind (typname attlen atttypmod attnull) row
+
+ (setf attlen (parse-integer attlen :junk-allowed t)
+ atttypmod (parse-integer atttypmod :junk-allowed t))
+
+ (let ((coltype (ensure-keyword typname))
+ (colnull (if (string-equal "f" attnull) 1 0))
+ collen
+ colprec)
+ (setf (values collen colprec)
+ (case coltype
+ ((:numeric :decimal)
+ (if (= -1 atttypmod)
+ (values nil nil)
+ (values (ash (- atttypmod 4) -16)
+ (boole boole-and (- atttypmod 4) #xffff))))
+ (otherwise
+ (values
+ (cond ((and (= -1 attlen) (= -1 atttypmod)) nil)
+ ((= -1 attlen) (- atttypmod 4))
+ (t attlen))
+ nil))))
+ (values coltype collen colprec colnull))))))
(defmethod database-create-sequence (sequence-name
(database generic-postgresql-database))
qualifier
&allow-other-keys)
(let ((root-class (find-class 'standard-db-object nil))
- (vmc (find-class 'standard-db-class)))
+ (vmc 'standard-db-class))
(setf (view-class-qualifier class)
(car qualifier))
(if root-class
- (if (member-if #'(lambda (super)
- (eq (class-of super) vmc)) direct-superclasses)
+ (if (some #'(lambda (super) (typep super vmc))
+ direct-superclasses)
(call-next-method)
(apply #'call-next-method
class
direct-superclasses qualifier
&allow-other-keys)
(let ((root-class (find-class 'standard-db-object nil))
- (vmc (find-class 'standard-db-class)))
+ (vmc 'standard-db-class))
(setf (view-table class)
(table-name-from-arg (sql-escape (or (and base-table
(if (listp base-table)
(setf (view-class-qualifier class)
(car qualifier))
(if (and root-class (not (equal class root-class)))
- (if (member-if #'(lambda (super)
- (eq (class-of super) vmc)) direct-superclasses)
+ (if (some #'(lambda (super) (typep super vmc))
+ direct-superclasses)
(call-next-method)
(apply #'call-next-method
class