Home | Previous Page | Next Page   Descriptor Function Reference > Accessor Functions >

mi_tab_nextrow()

The mi_tab_nextrow() function fetches the next index entry from several that the database server stores in shared memory.

Syntax

mi_integer
mi_tab_nextrow(MI_AM_TABLE_DESC  *tableDesc, 
   MI_ROW **row, 
   mi_integer *rowid, 
   mi_integer *fragid) 
tableDesc
points to the index descriptor.
row
points to the address of a row structure. The row structure contains the index entry that the access method reformats, if necessary, and inserts into the virtual index.
rowid
points to the row identifier of the associated table row.
fragid
points to the fragment identifier of the associated table row.

Usage

Use this function from the am_insert purpose function if am_insert can insert more than one new index entry. The values in row, rowid, and fragid replace the new row and row-ID descriptor that the database server passes to am_insert if shared memory holds only one new index entry.

The mi_tab_nextrow() function works together with the following related accessor functions:

For an example of how these three functions work together, refer to Figure 8.

Return Values

The return value increments for each call to am_insert. The first call to mi_tab_nextrow() returns 0, the second returns 1, and so forth. A negative return value indicates an error.

Related Topics

See the descriptions of:

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]