DB->exists |
#include <db.h>int DB->exists(DB *db, DB_TXN *txnid, DBT *key, u_int32_t flags);
The DB->exists method returns if the specified key appears in the database.
The DB->exists method will return DB_NOTFOUND if the specified key is not in the database. The DB->exists method will return DB_KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted. Unless otherwise specified, the DB->exists method returns a non-zero error value on failure and 0 on success.
ParametersBecause the DB->exists method will not hold locks across Berkeley DB calls in non-transactional operations, the DB_RMW flag to the DB->exists call is meaningful only in the presence of transactions.
Copyright (c) 1996,2008 Oracle. All rights reserved.