* sql/test-fdml.lisp: Renumber SELECT tests to avoid overwriting
a previous test
* sql/test-init.lisp: Check test-database-underlying-type for
ODBC/MySQL tests
* sql/objects.lisp: Fix (setf slot-value-using-class) for Lispworks
+9 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
+ * sql/test-fdml.lisp: Renumber SELECT tests to avoid overwriting
+ a previous test
+ * sql/test-init.lisp: Check test-database-underlying-type for
+ ODBC/MySQL tests
+ * sql/objects.lisp: Fix (setf slot-value-using-class) for Lispworks
+
8 May 2004 Marcus Pearce (m.t.pearce@city.ac.uk)
* sql/operations.lisp: complete remaining operations for the sql
syntax: SUBSTR, SOME, ORDER-BY, GROUP-BY, NULL, DISTINCT, EXCEPT,
8 May 2004 Marcus Pearce (m.t.pearce@city.ac.uk)
* sql/operations.lisp: complete remaining operations for the sql
syntax: SUBSTR, SOME, ORDER-BY, GROUP-BY, NULL, DISTINCT, EXCEPT,
#+lispworks
(dolist (slot-option +extra-slot-options+)
#+lispworks
(dolist (slot-option +extra-slot-options+)
- (process-slot-option standard-db-class slot-option))
+ (eval `(process-slot-option standard-db-class ,slot-option)))
#+lispworks
(dolist (class-option +extra-class-options+)
#+lispworks
(dolist (class-option +extra-class-options+)
- (process-class-option standard-db-class class-option))
+ (eval `(process-class-option standard-db-class ,class-option)))
(defmethod validate-superclass ((class standard-db-class)
(superclass standard-class))
(defmethod validate-superclass ((class standard-db-class)
(superclass standard-class))
(defmethod (setf slot-value-using-class) (new-value (class standard-db-class)
instance slot-def)
(declare (ignore new-value))
(defmethod (setf slot-value-using-class) (new-value (class standard-db-class)
instance slot-def)
(declare (ignore new-value))
- (let ((slot-name (%svuc-slot-name slot-def))
- (slot-kind (view-class-slot-db-kind slot-def)))
+ (let* ((slot-name (%svuc-slot-name slot-def))
+ (slot-object (%svuc-slot-object slot-def class))
+ (slot-kind (view-class-slot-db-kind slot-object)))
(call-next-method)
(when (and *db-auto-sync*
(not *db-initializing*)
(call-next-method)
(when (and *db-auto-sync*
(not *db-initializing*)
:field-names nil :result-types nil :flatp t)
("1" "2" "3" "4"))
:field-names nil :result-types nil :flatp t)
("1" "2" "3" "4"))
-(deftest :fdml/select/20
+(deftest :fdml/select/21
(clsql:select [substr [first-name] 1 4] :from [employee]
:flatp t :order-by [emplid] :field-names nil)
("Vlad" "Jose" "Leon" "Niki" "Leon" "Yuri" "Kons" "Mikh" "Bori" "Vlad"))
(clsql:select [substr [first-name] 1 4] :from [employee]
:flatp t :order-by [emplid] :field-names nil)
("Vlad" "Jose" "Leon" "Niki" "Leon" "Yuri" "Kons" "Mikh" "Bori" "Vlad"))
-(deftest :fdml/select/21
+(deftest :fdml/select/22
(clsql:select [\|\| [first-name] " " [last-name]] :from [employee]
:flatp t :order-by [emplid] :field-names nil)
("Vladamir Lenin" "Josef Stalin" "Leon Trotsky" "Nikita Kruschev"
"Leonid Brezhnev" "Yuri Andropov" "Konstantin Chernenko" "Mikhail Gorbachev"
"Boris Yeltsin" "Vladamir Putin"))
(clsql:select [\|\| [first-name] " " [last-name]] :from [employee]
:flatp t :order-by [emplid] :field-names nil)
("Vladamir Lenin" "Josef Stalin" "Leon Trotsky" "Nikita Kruschev"
"Leonid Brezhnev" "Yuri Andropov" "Konstantin Chernenko" "Mikhail Gorbachev"
"Boris Yeltsin" "Vladamir Putin"))
-(deftest :fdml/select/22
+(deftest :fdml/select/23
(clsql:select [emplid] :from [employee] :where [in [emplid] '(1 2 3 4)]
:flatp t :order-by [emplid] :field-names nil
:result-types nil)
("1" "2" "3" "4"))
(clsql:select [emplid] :from [employee] :where [in [emplid] '(1 2 3 4)]
:flatp t :order-by [emplid] :field-names nil
:result-types nil)
("1" "2" "3" "4"))
-(deftest :fdml/select/23
+(deftest :fdml/select/24
(clsql:select [distinct [first-name]] :from [employee] :flatp t
:order-by [first-name] :field-names nil :result-types nil)
("Boris" "Josef" "Konstantin" "Leon" "Leonid" "Mikhail" "Nikita" "Vladamir"
(clsql:select [distinct [first-name]] :from [employee] :flatp t
:order-by [first-name] :field-names nil :result-types nil)
("Boris" "Josef" "Konstantin" "Leon" "Leonid" "Mikhail" "Nikita" "Vladamir"
(push (cons test "fancy math not supported") skip-tests))
((and (eql *test-database-type* :sqlite)
(clsql-base::in test :fddl/view/4 :fdml/select/10
(push (cons test "fancy math not supported") skip-tests))
((and (eql *test-database-type* :sqlite)
(clsql-base::in test :fddl/view/4 :fdml/select/10
(push (cons test "not supported by sqlite") skip-tests))
(push (cons test "not supported by sqlite") skip-tests))
- ((and (eql *test-database-type* :mysql)
- (clsql-base::in test :fdml/select/21 :fdml/query/5
+ ((and (eql *test-database-underlying-type* :mysql)
+ (clsql-base::in test :fdml/select/22 :fdml/query/5
:fdml/query/7 :fdml/query/8))
(push (cons test "not supported by mysql") skip-tests))
(t
:fdml/query/7 :fdml/query/8))
(push (cons test "not supported by mysql") skip-tests))
(t