X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2Fref-oodml.xml;h=76df3ec4db0f075f04561ec4a5f9f7ab45f6359f;hb=4413405fd38eaba7ba6d6d8b844fef118e326c9a;hp=4fbf5651ee29a5cc9319dc4f2f0ac14e7b4d22f5;hpb=e087af7ef2e07195b7dea8821b9048d5826cac5a;p=clsql.git diff --git a/doc/ref-oodml.xml b/doc/ref-oodml.xml index 4fbf565..76df3ec 100644 --- a/doc/ref-oodml.xml +++ b/doc/ref-oodml.xml @@ -16,10 +16,31 @@ written with the OODML. - The main function for reading data with the OODML is the - select function. The - select is also used in the FDML. However, when select - is given a view class name, it returns a list of instances of view classes. + The main function for reading data with the OODML is the select + function. The select is also used in the + FDML. However, when select is given a view + class name, it returns a list of instances of view classes. + + + View class instances can be updated to reflect any changes in + the database with the functions update-slot-from-record + and update-instance-from-records. + + To update the database to reflect changes made to instances of view classes, use the functions update-records-from-instance, + update-record-from-slot, and + update-record-from-slots. + + + The function delete-instance-records + deletes the records corresponding to an instance of a view + class. @@ -40,12 +61,17 @@ &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. + 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 @@ -96,7 +122,7 @@ This special variable provides the default value for the max-len argument of the function update-object-joins. + linkend="update-objects-joins">update-object-joins. @@ -111,7 +137,9 @@ See Also - None. + + update-object-joins + Notes @@ -122,7 +150,8 @@ DELETE-INSTANCE-RECORDS - Delete SQL records represented by a view class object. + Delete SQL records represented by a view class + object. Function @@ -306,7 +335,7 @@ appropriate table of database which defaults to the database associated with object or, if object is not associated - with a database, *default-database*. Join slots are updated but + with a database, *default-database*. Join slots are updated but instances of the class on which the join is made are not updated. @@ -327,7 +356,7 @@ Affected by - Data in SQL database. + Data in SQL database. @@ -340,9 +369,6 @@ See Also - - - @@ -442,21 +468,23 @@ Affected by - - + *default-update-objects-max-len* + Exceptional Situations - + Database errors. See Also - + *default-update-objects-max-len* @@ -482,7 +510,30 @@ Arguments and Values - + + object + + + An instance of a view class. + + + + + slot + + + The name of a slot in object. + + + + + database + + + A database connection. + + + @@ -502,36 +553,35 @@ - examples + Examples - side effects + Side Effects - modifies sql database. + Modifies database. - affected by + Affected By - - - + Nothing. - exceptional situations + Exceptional Situations - if a database error occurs. + Database errors. - see also + See Also - + update-record-from-slots + update-records-from-instance @@ -555,14 +605,37 @@ (update-record-from-slots object slots &key (database *default-database*)) => - arguments and values + Arguments and Values - + + object + + + An instance of a view class. + + + + + slots + + + A list of slot names in object. + + + + + database + + + A database connection. + + + - description - updates the values stored in the columns represented by + Description + Updates the values stored in the columns represented by the slots, specified by the clos slot names slots, of view class instance object. database @@ -591,22 +664,21 @@ Affected by - - - + Nothing. Exceptional Situations - + Database errors. See Also - + update-record-from-slot + update-records-from-instance @@ -633,7 +705,22 @@ Arguments and Values - + + object + + + An instance of a view class. + + + + + database + + + A database connection. + + + @@ -659,28 +746,27 @@ Side Effects - + Modifies the database. Affected by - - - + Nothing. Exceptional Situations - + Database errors. See Also - + update-record-from-slot + update-record-from-slots @@ -706,7 +792,30 @@ Arguments and Values - + + object + + + An instance of a view class. + + + + + slot + + + The name of a slot in object. + + + + + database + + + A database connection. + + + @@ -718,7 +827,7 @@ defaults to the database associated with object or, if object is not associated with a database, - *default-database*. Join slots are updated + *default-database*. Join slots are updated but instances of the class on which the join is made are not updated. @@ -746,15 +855,12 @@ Exceptional Situations - SQL access errors. + Database errors. See Also - - -