UPDATE-RECORD-FROM-SLOT — Updates database from slot value.
Function
An instance of a View Class.
The name of a slot in object.
A database object. This will default to the value of *default-database*.
Updates the value stored in the column represented by the slot, specified by the CLOS slot name slot, of View Class instance object. 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 database and the attribute represented by slot is initialised from the value of the supplied slots with other attributes having default values. Furthermore, 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-record-from-slot *e1* 'email) => (select [email] :from [employee] :where [= [emplid] 1] :field-names nil :flatp t) => ("v.lenin@soviet.org")