This class implements a row which will be stored in a secondary index on
a heap table.
This class creates a new DataValueDescriptor array which will be the row used
to insert into the secondary index. The fields of this object array are made
up of references to DataValueDescriptors provided by the caller: the
DataValueDescriptors in the template and a RowLocation.
The interface is designed to support the standard access method interface
where callers provide a single template and then read rows into that template
over and over. This class keeps a reference to the objects in the template
and the rowlocation,
so the state of this object changes whenever the caller changes the template.
The caller provides a template which will contain a heap row,
and a RowLocation which provides the location of the row within the heap table.
So for example to create an index from a base table by reading the base table
and inserting each row one at a time into the secondary index you would
do something like:
DataValueDescriptors[] template = get_template_for_base_table();
RowLocation rowloc = ScanController_var.newRowLocationTemplate();
T_SecondaryIndexRow indrow = new T_SecondaryIndexRow();
indrow.init(template, rowloc, numcols_in_index);
while (ScanController_variable.next())
{
fetch(template)
fetchLocation(rowloc)
ConglomerateController_on_btree.insert(indrow.getRow());
}
|