X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2Fref-oodml.xml;h=9b17eba7ee7da5c5a129e771fcad51b98ad6d228;hb=e877b742b7e9a3d0ce6d4080bb78aada354ffa88;hp=f068a5d123217e9a9bdb5ce6e535233783ff863e;hpb=5248ae9f94d2022596ef8846e0581ea716607a84;p=clsql.git diff --git a/doc/ref-oodml.xml b/doc/ref-oodml.xml index f068a5d..9b17eba 100644 --- a/doc/ref-oodml.xml +++ b/doc/ref-oodml.xml @@ -17,27 +17,37 @@ *DB-AUTO-SYNC* - + Enables SQL storage during Lisp object creation. Variable Value Type - + Boolean Initial Value - nil + &nil; Description - + When this variable is &t; an instance is stored in the SQL database when the instance is created + by make-instance. When this variable is &nil;, which is the default value, &clsql; + behaves like &commonsql;: instances of view classes are stored to the SQL database only when + update-record-from-slots + is called. Examples - + (let ((instance (make-instance 'foo))) + (update-record-from-slots instance)) + + ;; is equivalent to + + (let ((*db-auto-sync* t)) + (make-instance 'foo)) @@ -46,7 +56,9 @@ See Also - None. + + update-record-from-slots + Notes @@ -57,27 +69,31 @@ *DEFAULT-UPDATE-OBJECTS-MAX-LEN* - + The default maximum number of objects each query to perform a join Variable Value Type - + (or null integer) Initial Value - nil + &nil; Description - + + This special variable provides the default value for the + max-len argument of the function update-object-joins. + Examples - + (setq *default-update-objects-max-len* 100) @@ -97,13 +113,13 @@ DELETE-INSTANCE-RECORDS - + Delete SQL records represented by a view class object Function Syntax - (DELETE-INSTANCE-RECORDS OBJECT) [generic] => + (delete-instance-records object) => Arguments and Values @@ -122,41 +138,50 @@ Examples - + * (def-view-class tab () ((a :type integer :db-kind :key) (b :type string))) + #<clsql-sys::db-standard-class tab> + * (defvar obj (let ((*db-auto-sync* t)) + (make-instance 'tab :a 5 :b "the string"))) + * (start-sql-recording :type :both) + * (delete-instance-records obj) + + Side Effects - + Deletes data from the SQL database. Affected by - - - + Permissions granted by the SQL database to the user in the database connection. Exceptional Situations - + An exception may be signaled if the database connection user does not have + sufficient privileges to modify the database. See Also - - - + + update-records + update-records-from-instance + Notes - + Instances are referenced in the database by values stored in the key slots. If + delete-records-from-instance is called with an instance of a class that does + not contain any keys, then all records in that table will be deleted. @@ -164,18 +189,25 @@ INSTANCE-REFRESHED - - Function + Hook to call on object refresh + Generic function Syntax - (INSTANCE-REFRESHED OBJECT) [generic] => + (instance-refreshed object) => Arguments and Values - + + object + + + The view class object which is being refreshed. + + + @@ -213,7 +245,7 @@ Exceptional Situations - + None. @@ -235,13 +267,13 @@ UPDATE-INSTANCE-FROM-RECORDS - + Update slot values from database. Function Syntax - (UPDATE-INSTANCE-FROM-RECORDS OBJECT &KEY DATABASE) [generic] => + (update-instance-from-records object &key database) => Arguments and Values @@ -304,13 +336,13 @@ UPDATE-OBJECTS-JOINS - + Updates joined slots of objects Function Syntax - (UPDATE-OBJECTS-JOINS OBJECTS &KEY (SLOTS T) (FORCE-P T) CLASS-NAME (MAX-LEN *DEFAULT-UPDATE-OBJECTS-MAX-LEN*)) [function] => + (update-objects-joins objects &key (slots t) (force-p t) class-name (max-len *default-update-objects-max-len*)) => Arguments and Values @@ -382,13 +414,13 @@ UPDATE-RECORD-FROM-SLOT - + Updates database from slot value Function Syntax - (UPDATE-RECORD-FROM-SLOT OBJECT SLOT &KEY DATABASE) [generic] => + (update-record-from-slot object slot &key database) => Arguments and Values @@ -454,13 +486,13 @@ UPDATE-RECORD-FROM-SLOTS - + Update database from slots of view class object Function Syntax - (UPDATE-RECORD-FROM-SLOTS OBJECT SLOTS &KEY DATABASE) [generic] => + (update-record-from-slots object slots &key database) => Arguments and Values @@ -528,13 +560,13 @@ UPDATE-RECORDS-FROM-INSTANCE - + Update database from view class object. Function Syntax - (UPDATE-RECORDS-FROM-INSTANCE OBJECT &KEY DATABASE) [generic] => + (update-records-from-instance object &key database) => Arguments and Values @@ -598,13 +630,13 @@ UPDATE-SLOT-FROM-RECORD - + Update objects slot from database. Function Syntax - (UPDATE-SLOT-FROM-RECORD OBJECT SLOT &KEY DATABASE) [generic] => + (update-slot-from-record object slot &key database) => Arguments and Values