WYRDTEK Home Features Reference Downloads About


Reference/es_mbs_add

Syntax

int es_mbs_add( struct es_mbs *siter, const char *fieldname );

Arguments

struct es_mbs *siter Database node sorted iterator.
const char *fieldname Database field name.

Return Codes

ES_ERROR_NONE Success. No errors.
ES_ERROR_UNKNOWNFIELD Database field fieldname does not exist in the class that the associated field-binding corresponds to.
ES_ERROR_INVALIDFIELDTYPE Can only sort on integer and floating point database fields.

Description

Select database field to act as sort key.

A sorted iterator can sort on one or more database fields, provided that they are either integer or floating-point. The order in which es_mbs_add() is invoked dictates the field sort order.

The set of fields on which to sort must be determined before a sorted iterator is initialized, i.e. es_mbs_add() must be called one or more times before calling es_mbs_begin().

[Back To Reference] [Back To Reference/es_mbs]