projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a5eb715
)
command-objects: made nil be treated as "null" in the database by default instead...
author
Russ Tyndall
<russ@acceleration.net>
Mon, 18 Jan 2010 16:21:48 +0000
(11:21 -0500)
committer
Russ Tyndall
<russ@acceleration.net>
Mon, 18 Jan 2010 16:21:48 +0000
(11:21 -0500)
sql/command-object.lisp
patch
|
blob
|
history
diff --git
a/sql/command-object.lisp
b/sql/command-object.lisp
index 1a9cc3e6edd159d2cdfe82957a053ff6a12c4121..f6c57693dbb5c9db6eea7ddee51012696f488aae 100644
(file)
--- a/
sql/command-object.lisp
+++ b/
sql/command-object.lisp
@@
-32,6
+32,19
@@
:documentation "Have we already prepared this command object")
))
:documentation "Have we already prepared this command object")
))
+(defmethod initialize-instance :after ((o command-object) &key &allow-other-keys )
+ ;; Inits parameter nulls
+ (setf (parameters o) (parameters o)))
+
+(defmethod (setf parameters) (new (o command-object))
+ " This causes the semantics to match cl-sql instead of cl-postgresql
+ "
+ (setf (slot-value o 'parameters)
+ (loop for p in (parameters o)
+ collect (cond ((null p) :null)
+ ((member p (list :false :F)) nil)
+ (T p)))))
+
(defun reset-command-object (co)
"Resets the command object to have no name and to be unprepared
(This is useful if you want to run a command against a second database)"
(defun reset-command-object (co)
"Resets the command object to have no name and to be unprepared
(This is useful if you want to run a command against a second database)"