projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9209: read tinyint as integer for odbc, handle boolean reading/writing fields
[clsql.git]
/
sql
/
metaclasses.lisp
diff --git
a/sql/metaclasses.lisp
b/sql/metaclasses.lisp
index b7b2e50b98f979927b5b6986ec4d760e5072905f..d6d92b85ce3595aef251d63779212c3fe69753b1 100644
(file)
--- a/
sql/metaclasses.lisp
+++ b/
sql/metaclasses.lisp
@@
-56,8
+56,8
@@
;;; Lispworks 4.2 and before requires special processing of extra slot and class options
;;; Lispworks 4.2 and before requires special processing of extra slot and class options
-(defvar +extra-slot-options+ '(:column :db-kind :db-reader :
nulls-ok
:db-constraints
-
:db-writer :db-type
:db-info))
+(defvar +extra-slot-options+ '(:column :db-kind :db-reader :
void-value
:db-constraints
+
:db-writer
:db-info))
(defvar +extra-class-options+ '(:base-table))
(dolist (slot-option +extra-slot-options+)
(defvar +extra-class-options+ '(:base-table))
(dolist (slot-option +extra-slot-options+)
@@
-287,13
+287,12
@@
column definition in the database.")
:initform nil
:documentation
"A single constraint or list of constraints for this column")
:initform nil
:documentation
"A single constraint or list of constraints for this column")
- (
nulls-ok
- :accessor view-class-slot-
nulls-ok
- :initarg :
nulls-ok
+ (
void-value
+ :accessor view-class-slot-
void-value
+ :initarg :
void-value
:initform nil
:documentation
:initform nil
:documentation
- "If t, all sql NULL values retrieved from the database become nil; if nil,
-all NULL values retrieved are converted by DATABASE-NULL-VALUE")
+ "Value to store is the SQL value is NULL. Default is NIL.")
(db-info
:accessor view-class-slot-db-info
:initarg :db-info
(db-info
:accessor view-class-slot-db-info
:initarg :db-info
@@
-443,8
+442,8
@@
which does type checking before storing a value in a slot."
(when (slot-boundp sd 'db-type)
(view-class-slot-db-type sd)))
(when (slot-boundp sd 'db-type)
(view-class-slot-db-type sd)))
- (setf (slot-value slotd '
nulls-ok
)
- (view-class-slot-
nulls-ok
sd))
+ (setf (slot-value slotd '
void-value
)
+ (view-class-slot-
void-value
sd))
;; :db-kind slot value defaults to :base (store slot value in
;; database)
;; :db-kind slot value defaults to :base (store slot value in
;; database)