WYRDTEK Home Features Reference Downloads About


Reference/es_mbi_incfetch

Syntax

int es_mbi_incfetch( struct es_mbi *iter );

Arguments

struct es_mbi *iter Database node iterator.

Return Codes

ES_ERROR_NONE Success. No errors.
ES_ERROR_FAILTOFIND Iterator has been incremented beyond the last row in database node nd.

Description

Increment iterator iter to point at next row in database node and fetch it's contents. The behavour is undefined if iter has not been previously initialized to a valid position.

If one or more membership filters ( struct es_mbm ) have been added to the associated iterator field-binding ( struct es_mbb ) es_mbi_incfetch() will instead advance to next row for which the filters are valid.

Returns ES_ERROR_FAILTOFIND if iter is advanced beyond the last row in the node.

es_mbi_beginfetch() and es_mbi_incfetch() are typically used together to iterate over all the rows in a node via a for loop:

  int r;
  for( r = es_mbi_beginfetch( iter, nd ); r == ES_ERROR_NONE;
       r = es_mbi_incfetch( iter ) ) {

    /* do useful work with the data for this row */

  }

[Back To Reference] [Back To Reference/es_mbi]