# qdbm::ADBM Class Reference

Aabstraction for database managers compatible with DBM. More...

Inheritance diagram for qdbm::ADBM:

List of all members.

## Public Member Functions

virtual | ~ADBM ()
| Release resources of the instance.
virtual void | close ()=0 throw (DBM_error)
| Close the database connection.
virtual void | storerec (const Datum &key, const Datum &val, bool replace=true)=0 throw (DBM_error)
| Store a record.
virtual void | deleterec (const Datum &key)=0 throw (DBM_error)
| Delete a record.
virtual Datum | fetchrec (const Datum &key)=0 throw (DBM_error)
| Fetch a record.
virtual Datum | firstkey ()=0 throw (DBM_error)
| Get the first key.
virtual Datum | nextkey ()=0 throw (DBM_error)
| Get the next key.
virtual bool | error ()=0 throw (DBM_error)
| Check whether a fatal error occured or not.

## Detailed Description

Aabstraction for database managers compatible with DBM.

## Member Function Documentation

virtual void qdbm::ADBM::close | ( |  | ) | throw (DBM_error)`[pure virtual]`

Close the database connection.

Exceptions:

  | DBM_error | if an error occurs.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

virtual void qdbm::ADBM::deleterec | ( | const Datum & | key | ) | throw (DBM_error)`[pure virtual]`

Delete a record.

Parameters:

  | key | reference to a key object.

Exceptions:

  | DBM_error | if an error occurs or no record corresponds.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

virtual bool qdbm::ADBM::error | ( |  | ) | throw (DBM_error)`[pure virtual]`

Check whether a fatal error occured or not.

Returns:
  true if the database has a fatal error, false if not.

Exceptions:

  | DBM_error | if an error occurs.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

virtual Datum qdbm::ADBM::fetchrec | ( | const Datum & | key | ) | throw (DBM_error)`[pure virtual]`

Fetch a record.

Parameters:

  | key | reference to a key object.

Returns:
  a temporary instance of the value of the corresponding record.

Exceptions:

  | DBM_error | if an error occurs or no record corresponds.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

virtual Datum qdbm::ADBM::firstkey | ( |  | ) | throw (DBM_error)`[pure virtual]`

Get the first key.

Returns:
  a temporary instance of the key of the first record.

Exceptions:

  | DBM_error | if an error occurs or no record corresponds.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

virtual Datum qdbm::ADBM::nextkey | ( |  | ) | throw (DBM_error)`[pure virtual]`

Get the next key.

Returns:
  a temporary instance of the key of the next record.

Exceptions:

  | DBM_error | if an error occurs or no record corresponds.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

virtual void qdbm::ADBM::storerec | ( | const Datum & | key,
|  | const Datum & | val,
|  | bool | replace = `true` |
| ) |  |  | throw (DBM_error)`[pure virtual]`

Store a record.

Parameters:

  | key | reference to a key object.
  | val | reference to a value object.
  | replace | whether the existing value is to be overwritten or not.

Exceptions:

  | DBM_error | if an error occurs or replace is cancelled.

Implemented in qdbm::Curia, qdbm::Depot, and qdbm::Villa.

The documentation for this class was generated from the following file:

- xadbm.h