Db::exists |
#include <db_cxx.h>int Db::exists(DbTxn *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 either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 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.