UPDATE-SLOT-FROM-RECORD — Update objects slot from database.Function
objectAn instance of a View Class.
slot
The name of a slot in object.
databaseA database object. This will default to the value of *default-database*.
Updates the slot value, specified by the CLOS slot name
slot, of the View Class instance
object using the attribute values of the
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 instances of the class on which the join is made are not
updated.
(defvar *e1* (car (select 'employee :where [= [slot-value 'employee 'emplid] 1] :flatp t)))
=> *E1*
(slot-value *e1* 'email)
=> "lenin@soviet.org"
(update-records [employee]
:av-pairs '(([email] "v.lenin@soviet.org"))
:where [= [emplid] 1])
=>
(update-slot-from-record *e1* 'email)
=> #<EMPLOYEE {4806B53D}>
(slot-value *e1* 'email)
=> "v.lenin@soviet.org"