X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=doc%2Fref-oodml.xml;h=4a5900cf6a300d27cc301d197ac5b220db59a70a;hp=f068a5d123217e9a9bdb5ce6e535233783ff863e;hb=3a45ae325932b9565993407c5c94b28cdefd1f14;hpb=d528dfe7e23fe5732fdbf1a282498fbec298d6cd diff --git a/doc/ref-oodml.xml b/doc/ref-oodml.xml index f068a5d..4a5900c 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. @@ -170,7 +195,7 @@ Syntax - (INSTANCE-REFRESHED OBJECT) [generic] => + (instance-refreshed object) => Arguments and Values