(get-slot-values-from-view instance (list slot-def) (car res)))))
-(defmethod database-null-value ((type t))
- (cond
- ((subtypep type 'string) nil)
- ((subtypep type 'integer) nil)
- ((subtypep type 'list) nil)
- ((subtypep type 'boolean) nil)
- ((eql type t) nil)
- ((subtypep type 'symbol) nil)
- ((subtypep type 'keyword) nil)
- ((subtypep type 'wall-time) nil)
- ((subtypep type 'duration) nil)
- ((subtypep type 'money) nil)
- (t
- (error "Unable to handle null for type ~A" type))))
-
(defmethod update-slot-with-null ((object standard-db-object)
slotname
slotdef)
(let ((st (slot-type slotdef))
- (allowed (slot-value slotdef 'nulls-ok)))
- (if allowed
- (setf (slot-value object slotname) nil)
- (setf (slot-value object slotname)
- (database-null-value st)))))
+ (void-value (slot-value slotdef 'void-value)))
+ (setf (slot-value object slotname) void-value)))
(defvar +no-slot-value+ '+no-slot-value+)
(if args
(format nil "INT(~A)" (car args))
"INT"))
+
+(defmethod database-get-type-specifier ((type (eql 'bigint)) args database)
+ (declare (ignore args database))
+ "BIGINT")
(defmethod database-get-type-specifier ((type (eql 'simple-base-string)) args
database)
"VARCHAR"
"VARCHAR(255)")))
+(defmethod database-get-type-specifier ((type (eql 'universal-time)) args database)
+ (declare (ignore args database))
+ "BIGINT")
+
(defmethod database-get-type-specifier ((type (eql 'wall-time)) args database)
(declare (ignore args))
(case (database-underlying-type database)
(declare (ignore database))
(etypecase val
(string
- (read-from-string val))
+ (parse-integer val))
+ (number val)))
+
+(defmethod read-sql-value (val (type (eql 'bigint)) database)
+ (declare (ignore database))
+ (etypecase val
+ (string
+ (parse-integer val))
(number val)))
(defmethod read-sql-value (val (type (eql 'float)) database)
(declare (ignore database))
(equal "t" val))
+(defmethod read-sql-value (val (type (eql 'univeral-time)) database)
+ (declare (ignore database))
+ (unless (eq 'NULL val)
+ (etypecase val
+ (string
+ (parse-intger val))
+ (number val)))
+
(defmethod read-sql-value (val (type (eql 'wall-time)) database)
(declare (ignore database))
(unless (eq 'NULL val)