r9234: rename package
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 5 May 2004 01:00:20 +0000 (01:00 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 5 May 2004 01:00:20 +0000 (01:00 +0000)
15 files changed:
ChangeLog
sql/classes.lisp
sql/generics.lisp
sql/kmr-mop.lisp
sql/metaclasses.lisp
sql/objects.lisp
sql/operations.lisp
sql/package.lisp
sql/relations.lisp
sql/sql.lisp
sql/syntax.lisp
sql/table.lisp
tests/test-init.lisp
tests/test-ooddl.lisp
tests/test-syntax.lisp

index 22b926276da7089cad33f49472a1207f928ceab2..643670f6c280c03812815f581d0a8a1c510ec7f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,26 +1,33 @@
 4 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 2.10.10-pre
+       * base/loop.lisp: Add object iteration. Use :result-type
+       :auto for result-set. Remove 
+       duplicate (and non-correct) code for non-list variables by
+       simply making an atom variable into a list. 
+       * sql/package.lisp: Remove unnecessary clsql-sys package
+       and replace it with clsql.
        * sql/metaclasses.lisp: Properly store specified-type from
        direct-slot-definition and then store translated type in
        effective-slot-definition
-       * sql/objects.lisp: Use specified type when invocating 
-       database-get-type-specifier. Return class for def-view-class.
+       * sql/classes.lisp: Don't output type in sql-output
+       for SQL-IDENT-ATTRIBUTE. This is in preparation for supporting
+       [foo :integer] as fields in SELECT.
+       * sql/query.lisp: Set default for :result-types to :auto in
+       FDML QUERY.
+       * sql/objects.lisp: Use specified-type when invocating 
+       database-get-type-specifier. def-view-class macro now returns
+       the class instance.
        * base/basic-sql.lisp: Make :AUTO the default value for
        :RESULT-TYPES for MAP-QUERY and DO-QUERY.
        * sql/objects.lisp: Add bigint type
-       * base/loop.lisp: Add object iteration. Use :result-type
-       :auto for result-set. Remove 
-       duplicate (and non-correct) code for non-list variables by
-       simply making an atom variable into a list. 
        * test/tests-basic.lisp: Add tests for :result-types for
        MAP-QUERY and DO-QUERY
        * test/test-fdml.lisp: Add test for result-types in LOOP
        and also using single symbol rather than a list for variables.
        Add test that default :result-types is auto for FDML QUERY.
-       * sql/query.lisp: Set default for :result-types to :auto in
-       FDML QUERY.
-       * test/test-oodml.lisp: Enable OO loop iteration test with
-       slight change.
+       * test/test-syntax.lisp: Don't expect TYPE in the SQL-OUTPUT
+       of SQL-IDENT-ATTRIBUTE.
+       * test/test-oodml.lisp: Enable OO loop iteration test
        
 4 May 2004 Marcus Pearce (m.t.pearce@city.ac.uk) 
        * Version 2.10.9
index b7cd0c6b95f16157ecfba0748f1d973c372edab8..4c11dbea69b0a235882046e0776c5b50157761f9 100644 (file)
@@ -13,7 +13,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 (defvar +empty-string+ "''")
 
     (if (and (not qualifier) (not type))
        (write-string (sql-escape (convert-to-db-default-case 
                                   (symbol-name name) database)) *sql-stream*)
+       ;;; KMR: The TYPE field is used by CommonSQL for type conversion -- it
+      ;;; should not be output in SQL statements
+      #+ignore
       (format *sql-stream* "~@[~A.~]~A~@[ ~A~]"
              (when qualifier
-                 (convert-to-db-default-case (sql-escape qualifier) database))
+               (convert-to-db-default-case (sql-escape qualifier) database))
              (sql-escape (convert-to-db-default-case name database))
              (when type
-                 (convert-to-db-default-case (symbol-name type) database))))
+               (convert-to-db-default-case (symbol-name type) database)))
+      (format *sql-stream* "~@[~A.~]~A"
+             (when qualifier
+               (convert-to-db-default-case (sql-escape qualifier) database))
+             (sql-escape (convert-to-db-default-case name database))))
     t))
 
 (defmethod output-sql-hash-key ((expr sql-ident-attribute) database)
index f38b80bb01d37900386f7f8ac8b69fe8b22c96f7..0fa8abe68962a60287a2fd7c1d97669270b8f88a 100644 (file)
@@ -16,7 +16,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 (defgeneric select (&rest args) 
   (:documentation
index 3953c8c279db097a67107bcee86a30a848bb8193..b709f1bea9c0b7ec81b21f4bd6ee462d9e93b881 100644 (file)
@@ -16,7 +16,7 @@
 ;;;; This file was extracted from the KMRCL utilities
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 #+lispworks
 (defun intern-eql-specializer (slot)
index a9f188950c52f3762bcf51a986c6c7f83b0fef86..b22e27a49a3014c02385c148c83da161c7fdf27a 100644 (file)
@@ -12,7 +12,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (when (>= (length (generic-function-lambda-list
index 33aab570302cf7dc098cf48a1bfc2d469841b38d..627989b104c1da1b34f47b68f9ff7a4eb511ca08 100644 (file)
@@ -13,7 +13,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 (defclass standard-db-object ()
   ((view-database :initform nil :initarg :view-database :reader view-database
@@ -169,7 +169,7 @@ superclass of the newly-defined View Class."
     (defclass ,class ,supers ,slots 
       ,@(if (find :metaclass `,cl-options :key #'car)
            `,cl-options
-           (cons '(:metaclass clsql-sys::standard-db-class) `,cl-options)))
+           (cons '(:metaclass clsql::standard-db-class) `,cl-options)))
     (finalize-inheritance (find-class ',class))
     (find-class ',class)))
 
index 990ed34bd0b45a070feeafe771fa47d1f3f15d55..177acbd1de39beb274ac96e31a73b328711bcfb1 100644 (file)
@@ -12,7 +12,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 ;; Keep a hashtable for mapping symbols to sql generator functions,
 ;; for use by the bracketed reader syntax.
index 952825ee099ae2288e528346cd14cde31dbc616f..7a48137f65ae73b84f083eb62e800fb36d13462f 100644 (file)
@@ -29,7 +29,7 @@
 
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
-  (defpackage #:clsql-sys
+  (defpackage #:clsql
     (:use #:common-lisp #:clsql-base
          #+clsql-sbcl-mop #:sb-mop
          #+clsql-cmucl-mop #:mop
 (setf *packages-for-warn-on-redefinition* 
       (delete "SQL" *packages-for-warn-on-redefinition* :test 'string=))
 
-(defpackage #:clsql
-  (:use #:common-lisp)
-  (:import-from #:clsql-sys . #2#)
-  (:export . #2#)
-  (:documentation "This is the SQL-Interface package of CLSQL."))
-
 (defpackage #:clsql-user
   (:use #:common-lisp)
-  (:import-from #:clsql-sys . #2#)
+  (:import-from #:clsql . #2#)
   (:export . #2#)
   (:documentation "This is the user package with CLSQL symbols."))
 
index ebbb29fb5ffefd43215937d2b293955e509dec96..bd492eb70fbf9e46544a2ae882f9ef5d7cc60d95 100644 (file)
@@ -12,7 +12,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 
 (defun synchronize-keys (src srckey dest destkey)
index c9a68a4e2e4105cc47b6f6ed917e681a765da6f8..273b8498d55eff1982ef69dd46aa397125b42640 100644 (file)
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
   
 ;;; Basic operations on databases
 
-
 (defmethod database-query-result-set ((expr %sql-expression) database
                                       &key full-set result-types)
   (database-query-result-set (sql-output expr database) database
index 371f046614ebe338a2d1325c4760968f184b2835..9fca44542083ca0f1721fc46c13bb85577d18d16 100644 (file)
@@ -14,8 +14,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 (defvar *original-reader-enter* nil)
 
index 3820c19bd61d623a02ee50aeae155fe605c15789..ad8c55a5ef699e363015f2e4d928fbdf4f214fb8 100644 (file)
@@ -15,7 +15,7 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(in-package #:clsql-sys)
+(in-package #:clsql)
 
 
 ;; Utilities
index 2f36da21643a81458c34872dd227a8085f37d422..489b4875dbc07ab4e2205f8c5f946330cd192fdc 100644 (file)
   (truncate-database :database *default-database*)
   
   (setf *test-database-underlying-type*
-       (clsql-sys:database-underlying-type *default-database*))
+       (clsql:database-underlying-type *default-database*))
   
   *default-database*)
 
index 3bbaa2d1d7f44a568660753c82d95aeb958139eb..ba671e603d1459a6c11f95aab4c4051f435324b2 100644 (file)
 ;; Ensure slots inherited from standard-classes are :virtual
 (deftest :ooddl/metaclass/1
     (values 
-     (clsql-sys::view-class-slot-db-kind
-      (clsql-sys::slotdef-for-slot-with-class 'extraterrestrial
+     (clsql::view-class-slot-db-kind
+      (clsql::slotdef-for-slot-with-class 'extraterrestrial
                                              (find-class 'person)))
-     (clsql-sys::view-class-slot-db-kind
-      (clsql-sys::slotdef-for-slot-with-class 'hobby (find-class 'person))))
+     (clsql::view-class-slot-db-kind
+      (clsql::slotdef-for-slot-with-class 'hobby (find-class 'person))))
   :virtual :virtual)
 
 ;; Ensure all slots in view-class are view-class-effective-slot-definition
 (deftest :ooddl/metaclass/2
     (values
      (every #'(lambda (slotd)
-                (typep slotd 'clsql-sys::view-class-effective-slot-definition))
-            (clsql-sys::class-slots (find-class 'person)))
+                (typep slotd 'clsql::view-class-effective-slot-definition))
+            (clsql::class-slots (find-class 'person)))
      (every #'(lambda (slotd)
-                (typep slotd 'clsql-sys::view-class-effective-slot-definition))
-            (clsql-sys::class-slots (find-class 'employee)))
+                (typep slotd 'clsql::view-class-effective-slot-definition))
+            (clsql::class-slots (find-class 'employee)))
      (every #'(lambda (slotd)
-                (typep slotd 'clsql-sys::view-class-effective-slot-definition))
-            (clsql-sys::class-slots (find-class 'company))))
+                (typep slotd 'clsql::view-class-effective-slot-definition))
+            (clsql::class-slots (find-class 'company))))
   t t t)
 
 (deftest :ooddl/join/1
index c2007f676f6130987337e33e87756519dd59ddd6..9de62fe762a9b27adec21395b23091589d2fc73f 100644 (file)
 
 (deftest :syntax/ident/5
     (clsql:sql [foo :integer])
-  "FOO INTEGER")
+  "FOO")
 
 (deftest :syntax/ident/6
     (clsql:sql [foo bar :integer])
-  "FOO.BAR INTEGER")
+  "FOO.BAR")
 
 (deftest :syntax/ident/7
     (clsql:sql ["foo" bar :integer])
-  "FOO.BAR INTEGER")
-
+  "FOO.BAR")
 
 (deftest :syntax/value/1
     (clsql:sql [any '(3 4)])