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

mi_tab_setnextrow()

The am_getnext purpose function calls mi_tab_setnextrow() to store the next entry that qualifies for selection.

Syntax

mi_integer
mi_tab_setnextrow(MI_AM_TABLE_DESC  *tableDesc, 
         MI_ROW *row, 
         mi_integer *rowid, 
         mi_integer *fragid) 
tableDesc
points to the table descriptor.
row
points to the address of a row structure that contains fetched data.
rowid
points to the row identifier of the fetched values.
fragid
is the ID associated with a fragment represented in the table descriptor.

Usage

Use this function in the am_getnext purpose function if the access method can fetch multiple rows into shared memory. The values in row and rowid replace arguments that the database server passes to am_getnext if shared memory accommodates only one fetched row.

The mi_tab_setnextrow() function works together with the following other accessor functions:

For an example that shows how these three functions work together, refer to Figure 13.

Return Values

The integer indicates which row in shared memory to fill. The first call to mi_tab_setnextrow() returns 0. Each subsequent call adds 1 to the previous return value. The maximum rows available depends on the value that mi_tab_niorows() returns.

A negative return value indicates an error.

Related Topics

See the descriptions of:

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