Change from British normalised spelling
authorKevin Rosenberg <kevin@rosenberg.net>
Fri, 29 Jan 2010 01:14:30 +0000 (18:14 -0700)
committerKevin Rosenberg <kevin@rosenberg.net>
Fri, 29 Jan 2010 01:14:30 +0000 (18:14 -0700)
Signed-off-by: Kevin Rosenberg <kevin@rosenberg.net>
ChangeLog
doc/clsql.pdf
doc/csql.xml
doc/html.tar.gz
doc/ref-ooddl.xml
sql/metaclasses.lisp
sql/ooddl.lisp
sql/oodml.lisp
tests/ds-nodes.lisp
tests/test-ooddl.lisp
tests/test-oodml.lisp

index a95eab2a4dc51f1cee42c4f3a93e03fb3ed9336f..f750a708e74ec2bd56e854a6624d30c8692f825c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+28 Jan 2009  Kevin Rosenberg <kevin@rosenberg.net>
+       * Change "normalise" from British spelling for consistency with
+       other American spellings in CLSQL.
+
 28 Jan 2009  Kevin Rosenberg <kevin@rosenberg.net>
        * db-mysql/Makefile: Add directory for Fedora 11/12 on 64-bit
        platform (Thanks to Michael Pheasant) and remove a 32-bit directory
index 6d5f45ae377282e25890011238c0c6fc95b0e2d1..2eccf6f882f244a40ba1ab135e7a2322eef89afd 100644 (file)
Binary files a/doc/clsql.pdf and b/doc/clsql.pdf differ
index 4374d93d6bf91a45d10a1ef55d25fed7480acc35..4787898bb3996ec6157698b6604218fb9a0d8c5b 100644 (file)
@@ -294,11 +294,11 @@ mapped into a database).  They would be defined as follows:
 </para>
 
 <para>
-  Another class option is <symbol>:normalisedp</symbol>, which signals
-  &clsql; to use a normalised schema for the mapping from slots to
+  Another class option is <symbol>:normalizedp</symbol>, which signals
+  &clsql; to use a normalized schema for the mapping from slots to
   &sql; columns. By default &clsql; includes all the slots of a parent
   class that map to &sql; columns into the child class. This option
-  tells &clsql; to normalise the schema, so that a join is done on the
+  tells &clsql; to normalize the schema, so that a join is done on the
   primary keys of the concerned tables to get a complete column set
   for the classes. For more information, see <link linkend="def-view-class">
   <function>def-view-class</function></link>.
@@ -473,9 +473,9 @@ save those till we get to the many-to-many relation examples.
 provides a mapping from &sql; tables to CLOS objects. By default class
 inheritance is handled by including all the columns from parent
 classes into the child class. This means your database schema becomes
-very much denormalised. The class option <symbol>:normalisedp</symbol>
+very much denormalized. The class option <symbol>:normalizedp</symbol>
 can be used to disable the default behaviour and have &clsql;
-normalise the database schemas of inherited classes.
+normalize the database schemas of inherited classes.
 </para>
 
 <para>
index b383815b358485dc57f847aaf18611fbd646b646..bce44bfc966f987f263e400eea0961d6b8b3cff4 100644 (file)
Binary files a/doc/html.tar.gz and b/doc/html.tar.gz differ
index be98f6dc148bc7bbfebe7fb5a6b09c4c97500ebc..de79f21229028207fef7aaf801129de7eac1740f 100644 (file)
          </listitem>
          <listitem>
            <para>
-             <parameter>:normalisedp</parameter> - specifies whether
-          this class uses normalised inheritance from parent classes.
-          Defaults to nil, i.e. non-normalised schemas. When true,
+             <parameter>:normalizedp</parameter> - specifies whether
+          this class uses normalized inheritance from parent classes.
+          Defaults to nil, i.e. non-normalized schemas. When true,
           SQL database tables that map to this class and parent
           classes are joined on their primary keys to get the full
           set of database columns for this class.
        this class.
       </para>
 
-      <title>Normalised inheritance schemas</title>
+      <title>Normalized inheritance schemas</title>
       <para>
-    Specifying that <symbol>:normalisedp</symbol> is <symbol>T</symbol>
-    tells &clsql; to normalise the database schema for inheritance.
+    Specifying that <symbol>:normalizedp</symbol> is <symbol>T</symbol>
+    tells &clsql; to normalize the database schema for inheritance.
     What this means is shown in the examples below.
       </para>
 
       <para>
-    With <symbol>:normalisedp</symbol> equal to <symbol>NIL</symbol>
+    With <symbol>:normalizedp</symbol> equal to <symbol>NIL</symbol>
     (the default) the class inheritance would result in the following:
       </para>
       <screen>
@@ -654,7 +654,7 @@ SQL table USER:
       </screen>
 
       <para>
-    Using <symbol>:normalisedp</symbol> <symbol>T</symbol>, both
+    Using <symbol>:normalizedp</symbol> <symbol>T</symbol>, both
     view-classes need a primary key to join them on:
       </para>
       <screen>
@@ -676,7 +676,7 @@ SQL table NODE:
   ((user-id :accessor user-id :initarg :user-id
             :type integer :db-kind :key :db-constraints (:not-null))
    (nick :accessor nick :initarg :nick :type (varchar 64)))
-  (:normalisedp t))
+  (:normalizedp t))
 
 SQL table USER:
 +---------+-------------+------+-----+---------+-------+
@@ -690,7 +690,7 @@ SQL table USER:
       <para>
         In this second case, all slots of the view-class 'node
         are also available in view-class 'user, and can be used
-        as one would expect. For example, with the above normalised
+        as one would expect. For example, with the above normalized
         view-classes 'node and 'user, and SQL tracing turned on:
       </para>
       <screen>
index 0d6471b19654fdeeb722dc16ffa5eec3626edccb..72a3388db78d93823cff55b1bb65376f21392e92 100644 (file)
@@ -46,8 +46,8 @@
    (key-slots
     :accessor key-slots
     :initform nil)
-   (normalisedp
-    :accessor normalisedp
+   (normalizedp
+    :accessor normalizedp
     :initform nil)
    (class-qualifier
     :accessor view-class-qualifier
 (defmethod initialize-instance :around ((class standard-db-class)
                                         &rest all-keys
                                         &key direct-superclasses base-table
-                                        qualifier normalisedp
+                                        qualifier normalizedp
                                         &allow-other-keys)
   (let ((root-class (find-class 'standard-db-object nil))
         (vmc 'standard-db-class))
                    (remove-keyword-arg all-keys :direct-superclasses)))
         (call-next-method))
     (set-view-table-slot class base-table)
-    (setf (normalisedp class) (car normalisedp))
+    (setf (normalizedp class) (car normalizedp))
     (register-metaclass class (nth (1+ (position :direct-slots all-keys))
                                    all-keys))))
 
 (defmethod reinitialize-instance :around ((class standard-db-class)
                                           &rest all-keys
-                                          &key base-table normalisedp
+                                          &key base-table normalizedp
                                           direct-superclasses qualifier
                                           &allow-other-keys)
   (let ((root-class (find-class 'standard-db-object nil))
         (vmc 'standard-db-class))
     (set-view-table-slot class base-table)
-    (setf (normalisedp class) (car normalisedp))
+    (setf (normalizedp class) (car normalizedp))
     (setf (view-class-qualifier class)
           (car qualifier))
     (if (and root-class (not (equal class root-class)))
     (setf (key-slots class) (remove-if-not (lambda (slot)
                                              (eql (slot-value slot 'db-kind)
                                                   :key))
-                                           (if (normalisedp class)
+                                           (if (normalizedp class)
                                                (ordered-class-direct-slots class)
                                                (ordered-class-slots class))))))
 
   (setf (key-slots class) (remove-if-not (lambda (slot)
                                            (eql (slot-value slot 'db-kind)
                                                 :key))
-                                         (if (normalisedp class)
+                                         (if (normalizedp class)
                                              (ordered-class-direct-slots class)
                                              (ordered-class-slots class)))))
 
index 2a81f8aefacca29975f9f6de6caa4ceacb1b00e5..ddc1452a72fa94b69e507a7db285abd176b55821 100644 (file)
@@ -45,7 +45,7 @@
                 (setf (slot-value instance slot-name)
                       (fault-join-slot class instance slot-object))
                 (setf (slot-value instance slot-name) nil)))
-          (when (and (normalisedp class)
+          (when (and (normalizedp class)
                      (not (member slot-name
                                   (mapcar #'(lambda (esd) (slot-definition-name esd))
                                           (ordered-class-direct-slots class))))
@@ -53,7 +53,7 @@
             (let ((*db-deserializing* t))
               (if (view-database instance)
                   (setf (slot-value instance slot-name)
-                        (fault-join-normalised-slot class instance slot-object))
+                        (fault-join-normalized-slot class instance slot-object))
                   (setf (slot-value instance slot-name) nil)))))))
   (call-next-method))
 
@@ -93,7 +93,7 @@ in DATABASE which defaults to *DEFAULT-DATABASE*."
     (if tclass
         (let ((*default-database* database)
               (pclass (car (class-direct-superclasses tclass))))
-          (when (and (normalisedp tclass) (not (table-exists-p (view-table pclass))))
+          (when (and (normalizedp tclass) (not (table-exists-p (view-table pclass))))
             (create-view-from-class (class-name pclass)
                                     :database database :transactions transactions))
           (%install-class tclass database :transactions transactions))
@@ -104,7 +104,7 @@ in DATABASE which defaults to *DEFAULT-DATABASE*."
 (defmethod %install-class ((self standard-db-class) database
                            &key (transactions t))
   (let ((schemadef '())
-        (ordered-slots (if (normalisedp self)
+        (ordered-slots (if (normalizedp self)
                            (ordered-class-direct-slots self)
                            (ordered-class-slots self))))
     (dolist (slotdef ordered-slots)
@@ -113,7 +113,7 @@ in DATABASE which defaults to *DEFAULT-DATABASE*."
         (when res
           (push res schemadef))))
     (if (not schemadef)
-        (unless (normalisedp self)
+        (unless (normalizedp self)
           (error "Class ~s has no :base slots" self))
         (progn
           (create-table (sql-expression :table (view-table self)) (nreverse schemadef)
index 9910ab484948088a569268f49b87fea8e9374a0d..e075b0c0d08535cd2acf50a3a60c287ff2009e11 100644 (file)
@@ -55,7 +55,7 @@
 (defun generate-selection-list (vclass)
   (let* ((sels nil)
          (this-class vclass)
-         (slots (if (normalisedp vclass)
+         (slots (if (normalizedp vclass)
                     (labels ((getdslots ()
                                (let ((sl (ordered-class-direct-slots this-class)))
                                  (cond (sl)
                                     (database *default-database*))
   (let* ((database (or (view-database obj) database))
          (view-class (class-of obj)))
-    (when (normalisedp view-class)
-      ;; If it's normalised, find the class that actually contains
+    (when (normalizedp view-class)
+      ;; If it's normalized, find the class that actually contains
       ;; the slot that's tied to the db
       (setf view-class
             (do ((this-class view-class
              (pk-slot (car (keyslots-for-class view-class)))
              (view-class-table (view-table view-class))
              (pclass (car (class-direct-superclasses view-class))))
-        (when (normalisedp view-class)
+        (when (normalizedp view-class)
           (setf pk (update-records-from-instance obj :database database
                                                  :this-class pclass))
           (when pk-slot
             (setf (slot-value obj (slot-definition-name pk-slot)) pk)))
         (let* ((slots (remove-if-not #'slot-storedp
-                                     (if (normalisedp view-class)
+                                     (if (normalizedp view-class)
                                          (ordered-class-direct-slots view-class)
                                          (ordered-class-slots view-class))))
                (record-values (mapcar #'slot-value-list slots)))
-          (cond ((and (not (normalisedp view-class))
+          (cond ((and (not (normalizedp view-class))
                       (not record-values))
                  (error "No settable slots."))
-                ((and (normalisedp view-class)
+                ((and (normalizedp view-class)
                       (not record-values))
                  nil)
                 ((view-database obj)
   (let* ((view-class (or this-class (class-of instance)))
          (pclass (car (class-direct-superclasses view-class)))
          (pres nil))
-    (when (normalisedp view-class)
+    (when (normalizedp view-class)
       (setf pres (update-instance-from-records instance :database database
                                                :this-class pclass)))
     (let* ((view-table (sql-expression :table (view-table view-class)))
                                     slot &key (database *default-database*))
   (let* ((view-class (find-class (class-name (class-of instance))))
          (slot-def (slotdef-for-slot-with-class slot view-class)))
-    (when (normalisedp view-class)
-      ;; If it's normalised, find the class that actually contains
+    (when (normalizedp view-class)
+      ;; If it's normalized, find the class that actually contains
       ;; the slot that's tied to the db
       (setf view-class
             (do ((this-class view-class
@@ -875,7 +875,7 @@ maximum of MAX-LEN instances updated in each query."
 ;;;; Should we not return the whole result, instead of only
 ;;;; the one slot-value? We get all the values from the db
 ;;;; anyway, so?
-(defun fault-join-normalised-slot (class object slot-def)
+(defun fault-join-normalized-slot (class object slot-def)
   (labels ((getsc (this-class)
              (let ((sc (car (class-direct-superclasses this-class))))
                (if (key-slots sc)
@@ -898,7 +898,7 @@ maximum of MAX-LEN instances updated in each query."
                                   (slot-value object hk))
                                  (t hk)))))
 
-        ;; Caching nil in next select, because in normalised mode
+        ;; Caching nil in next select, because in normalized mode
         ;; records can be changed through other instances (children,
         ;; parents) so changes possibly won't be noticed
         (let ((res (car (select (class-name sc) :where jq
@@ -907,14 +907,14 @@ maximum of MAX-LEN instances updated in each query."
                                                 :database (view-database object))))
               (slot-name (slot-definition-name slot-def)))
 
-          ;; If current class is normalised and wanted slot is not
+          ;; If current class is normalized and wanted slot is not
           ;; a direct member, recurse up
-          (if (and (normalisedp class)
+          (if (and (normalizedp class)
                    (not (member slot-name
                                 (mapcar #'(lambda (esd) (slot-definition-name esd))
                                         (ordered-class-direct-slots class))))
                    (not (slot-boundp res slot-name)))
-              (fault-join-normalised-slot sc res slot-def)
+              (fault-join-normalized-slot sc res slot-def)
               (slot-value res slot-name)))))) )
 
 (defun join-qualifier (class object slot-def)
@@ -979,7 +979,7 @@ maximum of MAX-LEN instances updated in each query."
                          ;; find all immediate-select slots and join-vals for this object
                          (let* ((jo-class (class-of jo))
                                 (slots
-                                 (if (normalisedp jo-class)
+                                 (if (normalizedp jo-class)
                                      (class-direct-slots jo-class)
                                      (class-slots jo-class)))
                                 (pos-list (remove-if #'null
index 7a8c8a6250418ef82122f77e83f8813ba8fd152a..bb43ff09de8579b126f4052cf9c8ac829b37f828 100644 (file)
@@ -19,7 +19,7 @@
 
 
 
-;; classes for testing the normalisedp stuff
+;; classes for testing the normalizedp stuff
 (def-view-class node ()
   ((node-id :accessor node-id :initarg :node-id
             :type integer :db-kind :key
   ((setting-id :accessor setting-id :initarg :setting-id
                :type integer :db-kind :key :db-constraints (:not-null))
    (vars :accessor vars :initarg :vars :type (varchar 240)))
-  (:normalisedp t))
+  (:normalizedp t))
 
 (def-view-class user (node)
   ((user-id :accessor user-id :initarg :user-id
             :type integer :db-kind :key :db-constraints (:not-null))
    (nick :accessor nick :initarg :nick :type (varchar 64)))
-  (:normalisedp t))
+  (:normalizedp t))
 
 (def-view-class theme (setting)
   ((theme-id :accessor theme-id :initarg :theme-id
              :type integer :db-kind :key :db-constraints (:not-null))
    (doc :accessor doc :initarg :doc :type (varchar 240)))
-  (:normalisedp t))
+  (:normalizedp t))
 
 ;; A class that uses only a superclass db table
 (def-view-class location (node)
   ()
   (:base-table node)
-  (:normalisedp t))
+  (:normalizedp t))
 
 (def-view-class subloc (location)
   ((subloc-id :accessor subloc-id :initarg :subloc-id
              :type integer :db-kind :key :db-constraints (:not-null))
    (loc :accessor loc :initarg :loc :type (varchar 64)))
-  (:normalisedp t))
+  (:normalizedp t))
 
 
 
index 24a9750fcc25b1775887e78d7013f88e297378fc..fb4e14302015396c2ab7e4b7b6a452a0e9e40efe 100644 (file)
             (clsql-sys::class-slots (find-class 'company))))
   t t t t t t)
 
-;; Ensure classes are correctly marked normalised or not, default not
+;; Ensure classes are correctly marked normalized or not, default not
 ;(deftest :ooddl/metaclass/3
 ;    (values
-;     (clsql-sys::normalisedp derivednode1)
-;    (clsql-sys::normalisedp basenode)
-;    (clsql-sys::normalisedp company1)
-;    (clsql-sys::normalisedp employee3)
-;    (clsql-sys::normalisedp derivednode-sc-2))
+;     (clsql-sys::normalizedp derivednode1)
+;    (clsql-sys::normalizedp basenode)
+;    (clsql-sys::normalizedp company1)
+;    (clsql-sys::normalizedp employee3)
+;    (clsql-sys::normalizedp derivednode-sc-2))
 ;  t nil nil nil t)
 
 ;(deftest :ooddl/metaclass/3
 ; (values
-;  (normalisedp (find-class 'baseclass))
-;  (normalisedp (find-class 'normderivedclass)))
+;  (normalizedp (find-class 'baseclass))
+;  (normalizedp (find-class 'normderivedclass)))
 ; nil t)
 
 (deftest :ooddl/join/1
index ca1b7f81077780126ecd49865de21f436c73dff3..06e246005487bb8bc1526988d774b7fb49f9b4b1 100644 (file)
          (slot-value employee1 'email))))
   "lenin@soviet.org" "lenin-nospam@soviet.org")
 
-;; tests normalisedp update-instance-from-records
+;; tests normalizedp update-instance-from-records
 (deftest :oodml/update-instance/3
     (with-dataset *ds-nodes*
       (values
   "11 subloc-2 second subloc"
   "11 Altered title Altered loc")
 
-;; tests update-slot-from-record with normalisedp stuff
+;; tests update-slot-from-record with normalizedp stuff
 (deftest :oodml/update-instance/6
     (with-dataset *ds-nodes*
       (values