X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=doc%2Fref-oodml.xml;fp=doc%2Fref-oodml.xml;h=7ff2a78bbb51fe6bef54b081a777b72c161cfbb6;hp=4fbf5651ee29a5cc9319dc4f2f0ac14e7b4d22f5;hb=5edc92aee527621ed13245b5b7892e40c2cd443f;hpb=e087af7ef2e07195b7dea8821b9048d5826cac5a diff --git a/doc/ref-oodml.xml b/doc/ref-oodml.xml index 4fbf565..7ff2a78 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 @@ -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 @@ -442,14 +471,17 @@ Affected by - + + *default-update-objects-max-len* + Exceptional Situations - + Database errors. @@ -482,7 +514,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 +557,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 +609,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 +668,21 @@ Affected by - - - + Nothing. Exceptional Situations - + Database errors. See Also - + update-record-from-slot + update-records-from-instance @@ -633,7 +709,22 @@ Arguments and Values - + + object + + + An instance of a view class. + + + + + database + + + A database connection. + + + @@ -659,28 +750,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 +796,30 @@ Arguments and Values - + + object + + + An instance of a view class. + + + + + slot + + + The name of a slot in object. + + + + + database + + + A database connection. + + + @@ -746,7 +859,7 @@ Exceptional Situations - SQL access errors. + Database errors.