From: Kevin M. Rosenberg Date: Wed, 5 May 2004 01:00:20 +0000 (+0000) Subject: r9234: rename package X-Git-Tag: v3.8.6~525 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=b43e20a168dae4ae9d176ebc0fbf18ea6e4517dc r9234: rename package --- diff --git a/ChangeLog b/ChangeLog index 22b9262..643670f 100644 --- 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 diff --git a/sql/classes.lisp b/sql/classes.lisp index b7cd0c6..4c11dbe 100644 --- a/sql/classes.lisp +++ b/sql/classes.lisp @@ -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+ "''") @@ -149,12 +149,19 @@ (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) diff --git a/sql/generics.lisp b/sql/generics.lisp index f38b80b..0fa8abe 100644 --- a/sql/generics.lisp +++ b/sql/generics.lisp @@ -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 diff --git a/sql/kmr-mop.lisp b/sql/kmr-mop.lisp index 3953c8c..b709f1b 100644 --- a/sql/kmr-mop.lisp +++ b/sql/kmr-mop.lisp @@ -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) diff --git a/sql/metaclasses.lisp b/sql/metaclasses.lisp index a9f1889..b22e27a 100644 --- a/sql/metaclasses.lisp +++ b/sql/metaclasses.lisp @@ -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 diff --git a/sql/objects.lisp b/sql/objects.lisp index 33aab57..627989b 100644 --- a/sql/objects.lisp +++ b/sql/objects.lisp @@ -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))) diff --git a/sql/operations.lisp b/sql/operations.lisp index 990ed34..177acbd 100644 --- a/sql/operations.lisp +++ b/sql/operations.lisp @@ -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. diff --git a/sql/package.lisp b/sql/package.lisp index 952825e..7a48137 100644 --- a/sql/package.lisp +++ b/sql/package.lisp @@ -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 @@ -435,15 +435,9 @@ (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.")) diff --git a/sql/relations.lisp b/sql/relations.lisp index ebbb29f..bd492eb 100644 --- a/sql/relations.lisp +++ b/sql/relations.lisp @@ -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) diff --git a/sql/sql.lisp b/sql/sql.lisp index c9a68a4..273b849 100644 --- a/sql/sql.lisp +++ b/sql/sql.lisp @@ -12,11 +12,10 @@ ;;;; (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 diff --git a/sql/syntax.lisp b/sql/syntax.lisp index 371f046..9fca445 100644 --- a/sql/syntax.lisp +++ b/sql/syntax.lisp @@ -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) diff --git a/sql/table.lisp b/sql/table.lisp index 3820c19..ad8c55a 100644 --- a/sql/table.lisp +++ b/sql/table.lisp @@ -15,7 +15,7 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* -(in-package #:clsql-sys) +(in-package #:clsql) ;; Utilities diff --git a/tests/test-init.lisp b/tests/test-init.lisp index 2f36da2..489b487 100644 --- a/tests/test-init.lisp +++ b/tests/test-init.lisp @@ -160,7 +160,7 @@ (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*) diff --git a/tests/test-ooddl.lisp b/tests/test-ooddl.lisp index 3bbaa2d..ba671e6 100644 --- a/tests/test-ooddl.lisp +++ b/tests/test-ooddl.lisp @@ -26,25 +26,25 @@ ;; 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 diff --git a/tests/test-syntax.lisp b/tests/test-syntax.lisp index c2007f6..9de62fe 100644 --- a/tests/test-syntax.lisp +++ b/tests/test-syntax.lisp @@ -59,16 +59,15 @@ (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)])