Next Prev Up Top Contents Index

update-objects-joins

Function
Summary

Updates the remote join slots.

Signature

update-objects-joins objects &key slots force-p class-name max-len

Arguments

objects

A list of database objects.

slots

A list of slot names, or t .

force-p

A boolean.

class-name

The class of the objects, or nil .

max-len

A non-negative integer, or nil .

Values

 

Description

The function update-objects-joins updates the remote join slots, that is those slots defined without :retrieval :immediate .

This is an optimization functtion which can improve the efficiency of an application by reducing the number of queries of the database. For each slot, it queries the database using the data from all the objects, and then assigns the appropriate value to each object.

objects is a list of database objects. If class-name is non- nil , then all the database objects are of this class. If class-name is nil , then all the database objects are of the class of the first database object in the list objects .

If objects is nil , then update-objects-joins does nothing.

class-name specifies a class containing all the database objects in the list objects . If class-name is nil (the default) then the class of the first database object is used.

slots provides a list of the names of slots to update. Each of these slots should be a remote join slot (as defined above).

slots can also be t , meaning update all the remote join slots. The default value of slots is t .

force-p controls whether to force the update of all values in the objects. If force-p is nil , then slots which are already are not updated. The default value of force-p is t .

max-len , if non- nil , is a maximum number of objects from which to use data in a single query. If the length of the list objects is greater than max-len then update-objects-joins performs multiple queries using the data from no more than max-len objects in each query. This is useful if the DBMS may reject large queries, but it will increase the number of queries and hence reduce overall performance to some extent. The default value of max-len is the value of the variable *default-update-objects-max-len*.

See also

*default-update-objects-max-len*
def-view-class


LispWorks Reference Manual - 25 Jul 2003

Next Prev Up Top Contents Index