UPDATE-RECORDS-FROM-INSTANCE — Update database from view class object.
Function
An instance of a View Class.
database object. This will default to the value of *default-database*.
Using an instance of a View Class, object, update the table that stores its instance data. database specifies the database in which the update is made only if object is not associated with a database. In this case, a record is created in the appropriate table of database using values from the slot values of object, and object becomes associated with database.
(select [email] :from [employee] :where [= [emplid] 1] :field-names nil :flatp t) => ("lenin@soviet.org") (defvar *e1* (car (select 'employee :where [= [slot-value 'employee 'emplid] 1] :flatp t))) => *E1* (slot-value *e1* 'email) => "lenin@soviet.org" (setf (slot-value *e1* 'email) "v.lenin@soviet.org") => "v.lenin@soviet.org" (update-records-from-instance *e1*) => (select [email] :from [employee] :where [= [emplid] 1] :field-names nil :flatp t) => ("v.lenin@soviet.org")