Name

update-record-from-slots — update database from slots of view class object.

function

syntax

      (update-record-from-slots object slots &key (database *default-database*)) => 

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 the slots, specified by the clos slot names slots, 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 the appropriate table of database and the attributes represented by slots are initialised from the values of the supplied slots with other attributes having default values. Furthermore, object becomes associated with database.

Examples

        
      

Side Effects

Modifies the SQL database.

Affected by

Nothing.

Exceptional Situations

Database errors.

See Also

update-record-from-slot
update-records-from-instance

Notes