r9452: * sql/sql.lisp: Honor case of string table identifier to INSERT-RECORDS
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 23 May 2004 13:43:07 +0000 (13:43 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 23 May 2004 13:43:07 +0000 (13:43 +0000)
        * test/test-fddl.lisp: Add two tests for mixed case names

ChangeLog
TODO
sql/classes.lisp
tests/test-fddl.lisp

index fce7ca43c422bd360f3410fa56024b11ef3979e9..5bf5a4f58fb54c4b2aa49e49c5bec0529a0adcd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
        * sql/kmr-mop.lisp, sql/objects.lisp: Since SBCL is the only implementation that
        has reversed class slots, change the default for ordered-class-slots so that slots
        are now in the same order an in the def-view-class.
+       * sql/sql.lisp: Honor case of string table identifier to INSERT-RECORDS
+       * test/test-fddl.lisp: Add two tests for mixed case names
        
 22 May 2004 Kevin Rosenberg
        * Version 2.10.21 released
diff --git a/TODO b/TODO
index 2daf98af477aedaa73886e7f3cdce3d0f3f7d96e..53afb2f4983022fbd6e39f10f30a0a4e3f46bbab 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,7 +11,6 @@ TESTS TO ADD
 * owner phrases for postgresql and oracle backends
 * test of large table with large numbers of rows, greater than 2x the number of
   rows (200) returned by the oracle backend at a time
-* test mixed case table identifiers and column identifiers
 
 COMMONSQL INCOMPATIBILITY
 
index 6848621aa387c6436a22907ce5863c0b59589580..80d735c1ee07eed15b4a6d13f20d35116382477f 100644 (file)
@@ -661,7 +661,11 @@ uninclusive, and the args from that keyword to the end."
   (with-slots (into attributes values query)
     ins
     (write-string "INSERT INTO " *sql-stream*)
-    (output-sql into database)
+    (output-sql 
+     (typecase into
+       (string (sql-expression :attribute into))
+       (t into)) 
+     database)
     (when attributes
       (write-char #\Space *sql-stream*)
       (output-sql attributes database))
index 7623b4bcc134ca2b803facb682eda24377c0e858..301c37c0af89f440ac8dd135253ac9ef331a60fe 100644 (file)
                     (clsql:drop-table [foo] :if-does-not-exist :ignore))))
   "comments" "height" "id" "name")
 
+(deftest :fddl/table/4
+    (values
+     (clsql:table-exists-p "MyMixedCase")
+     (progn
+       (clsql:create-table "MyMixedCase" '(([a] integer)))
+       (clsql:table-exists-p "MyMixedCase"))
+     (progn
+       (clsql:drop-table "MyMixedCase")
+       (clsql:table-exists-p "MyMixedCase")))
+  nil t nil)
+
+(deftest :fddl/table/5
+    (prog1
+       (progn
+         (clsql:create-table "MyMixedCase" '(([a] integer)))
+         (clsql:execute-command "insert into MyMixedCase values (5)")
+          (clsql:insert-records :into "MyMixedCase" :values '(6))
+          (clsql:select [a] :from "MyMixedCase" :order-by '((a :asc))))
+      (clsql:drop-table "MyMixedCase"))
+  ((5) (6)))
+
 (deftest :fddl/attributes/1
     (apply #'values
            (sort