Next Previous Up Top Contents Index

14.4.3 Object-Oriented Data Manipulation Language (OODML)

14.4.3.1 Examples

[select 'employee]
--> #<SQL-OBJECT-QUERY (EMPLOYEE)>

(select 'employee :where [= [slot-value 'employee 'employee-job] "SALESMAN"]) ((#<db-instance EMPLOYEE 8067092>) (#<db-instance EMPLOYEE 8069536>) (#<db-instance EMPLOYEE 8069176>))

(list-classes) (#<db-class EMPLOYEE> #<db-class DEPARTMENT>)

In the following generic functions, instance is an instance of adef-view-class representing a record in a database.

update-records-from-instance

Generic function

update-records-from-instance instance &key database

Updates the record in database represented by instance. If the instance is already associated with a database, that database is used and database is ignored. If instance is not yet associated with a database, a record is created for instance in the appropriate table of database and the instance becomes associated with that database.
update-record-from-slot

Generic function

update-record-from-slots

Generic function

update-record-from-slot instance slot &key database

update-record-from-slots instance slots &key database

Updates the individual data item from slot or list of slots for instance. As withupdate-records-from-instance, database is only used if instance is not yet associated with a database, in which case a record is created in database. Only slot or slots are initialized in this case; other columns in the underlying database receive default values. Slots are the CLOS slot names; the corresponding column names are derived from the view class definition.
delete-instance-records

Generic function

delete-instance-records instance

Deletes the records represented by instance from the database associated with it. If instance has no associated database,delete-instance-records signals an error.

LispWorks User Guide - 14 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker