#include <db.h> int DBcursor->count(DBC *DBcursor, db_recno_t *countp, u_int32_t flags);
The DBcursor->count()
method returns a count of the number of data
items for the key to which the cursor refers.
The DBcursor->count()
method returns a non-zero error value on failure and 0 on success.
The countp parameter references memory into which the count of the number of duplicate data items is copied.
The DBcursor->count()
method may fail and return one of the following non-zero errors:
When a client synchronizes with the master, it is possible for committed
transactions to be rolled back. This invalidates all the database and cursor
handles opened in the replication environment. Once this occurs, an attempt to use
such a handle will
return DB_REP_HANDLE_DEAD
.
The application will need to discard the handle and open a new one in order to
continue processing.