# classname_indexname_next_match(patricia)(scalar)

> This function advances the cursor c to the next record matching the key value specified in ‘mask'.

### Prototype

>         MCO_RET	classname_indexname_next_match(	/*IN*/ mco_trans_h t,
>                                  /*IN*/ mco_cursor_h c,
>                                  /*IN*/ <type> mask,
>                                  /*IN*/ uint2 number_of_bits);

### Arguments

t | A transaction handle returned by`mco_trans_start()`
c | A cursor handle returned by *_index_cursor
mask | A scalar value of type “`<type>`” (the type of the index field).
number_of_bits | The number of bits to match

### Description

> This function advances the cursor c to the next record matching the key value specified in ‘`mask`’ (which must be the initial match value passed in the prior call to the search function: `_longest_match`, `_exact_match`, or `_prefix_match`).

### Return Codes

MCO_S_OK | A record with index matching ‘`mask`’ was found
MCO_S_NOTFOUND | The subset of records matching ‘`mask`’ is finished
MCO_E_DISK_NOT_OPENED | indexname is in a persistent class and disk access was not initialized by`db_open_dev()`
MCO_E_VOLUNTARY_NOT_EXIST | indexname is voluntary and has not been created, or was dropped
MCO_E_NOMEM | Out of memory
MCO_ERR_CURSOR | Fatal error in cursor operation

Related Topics