UPDATE-INSTANCE-FROM-RECORDS — Update slot values from database.
Function
objectAn instance of a View Class.
databaseA database object. This will default to the value of *default-database*.
Updates the slot values 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-instance-from-records *e1*)
=> #<EMPLOYEE {4806B53D}>
(slot-value *e1* 'email)
=> "v.lenin@soviet.org"