Public Member Functions | |
Depot (const char *name, int omode=Depot::OREADER, int bnum=-1) throw (Depot_error) | |
Get the database handle. | |
virtual | ~Depot () throw () |
Release the resources. | |
virtual void | close () throw (Depot_error) |
Close the database handle. | |
virtual void | put (const char *kbuf, int ksiz, const char *vbuf, int vsiz, int dmode=Depot::DOVER) throw (Depot_error) |
Store a record. | |
virtual void | out (const char *kbuf, int ksiz) throw (Depot_error) |
Delete a record. | |
virtual char * | get (const char *kbuf, int ksiz, int start=0, int max=-1, int *sp=0) throw (Depot_error) |
Retrieve a record. | |
virtual int | getwb (const char *kbuf, int ksiz, int start, int max, char *vbuf) throw (Depot_error) |
Retrieve a record and write the value into a buffer. | |
virtual int | vsiz (const char *kbuf, int ksiz) throw (Depot_error) |
Get the size of the value of a record. | |
virtual void | iterinit () throw (Depot_error) |
Initialize the iterator of the database handle. | |
virtual char * | iternext (int *sp=0) throw (Depot_error) |
Get the next key of the iterator. | |
virtual void | setalign (int align) throw (Depot_error) |
Set alignment of the database handle. | |
virtual void | setfbpsiz (int size) throw (Depot_error) |
Set the size of the free block pool. | |
virtual void | sync () throw (Depot_error) |
Synchronize updating contents with the file and the device. | |
virtual void | optimize (int bnum=-1) throw (Depot_error) |
Optimize the database. | |
virtual char * | name () throw (Depot_error) |
Get the name of the database. | |
virtual int | fsiz () throw (Depot_error) |
Get the size of the database file. | |
virtual int | bnum () throw (Depot_error) |
Get the number of the elements of the bucket array. | |
virtual int | busenum () throw (Depot_error) |
Get the number of the used elements of the bucket array. | |
virtual int | rnum () throw (Depot_error) |
Get the number of the records stored in the database. | |
virtual bool | writable () throw (Depot_error) |
Check whether the database handle is a writer or not. | |
virtual bool | fatalerror () throw (Depot_error) |
Check whether the database has a fatal error or not. | |
virtual int | inode () throw (Depot_error) |
Get the inode number of the database file. | |
virtual time_t | mtime () throw (Depot_error) |
Get the last modified time of the database. | |
virtual int | fdesc () throw (Depot_error) |
Get the file descriptor of the database file. | |
virtual void | storerec (const Datum &key, const Datum &val, bool replace=true) throw (Depot_error) |
Store a record. | |
virtual void | deleterec (const Datum &key) throw (Depot_error) |
Delete a record. | |
virtual Datum | fetchrec (const Datum &key) throw (Depot_error) |
Fetch a record. | |
virtual Datum | firstkey () throw (Depot_error) |
Get the first key. | |
virtual Datum | nextkey () throw (Depot_error) |
Get the next key. | |
virtual bool | error () throw (Depot_error) |
Check whether a fatal error occured or not. | |
Static Public Member Functions | |
static const char * | version () throw () |
Get the version information. | |
static void | remove (const char *name) throw (Depot_error) |
Remove a database file. | |
static char * | snaffle (const char *name, const char *kbuf, int ksiz, int *sp) throw (Depot_error) |
Retrieve a record directly from a database file. | |
Static Public Attributes | |
static const int | ENOERR |
error code: no error | |
static const int | EFATAL |
error code: with fatal error | |
static const int | EMODE |
error code: invalid mode | |
static const int | EBROKEN |
error code: broken database file | |
static const int | EKEEP |
error code: existing record | |
static const int | ENOITEM |
error code: no item found | |
static const int | EALLOC |
error code: memory allocation error | |
static const int | EMAP |
error code: memory mapping error | |
static const int | EOPEN |
error code: open error | |
static const int | ECLOSE |
error code: close error | |
static const int | ETRUNC |
error code: trunc error | |
static const int | ESYNC |
error code: sync error | |
static const int | ESTAT |
error code: stat error | |
static const int | ESEEK |
error code: seek error | |
static const int | EREAD |
error code: read error | |
static const int | EWRITE |
error code: write error | |
static const int | ELOCK |
error code: lock error | |
static const int | EUNLINK |
error code: unlink error | |
static const int | EMKDIR |
error code: mkdir error | |
static const int | ERMDIR |
error code: rmdir error | |
static const int | EMISC |
error code: miscellaneous error | |
static const int | OREADER |
open mode: open as a reader | |
static const int | OWRITER |
open mode: open as a writer | |
static const int | OCREAT |
open mode: writer creating | |
static const int | OTRUNC |
open mode: writer truncating | |
static const int | ONOLCK |
open mode: open without locking | |
static const int | OLCKNB |
open mode: lock without blocking | |
static const int | OSPARSE |
open mode: create as a sparse file | |
static const int | DOVER |
write mode: overwrite the existing value | |
static const int | DKEEP |
write mode: keep the existing value | |
static const int | DCAT |
write mode: concatenate values |
|
Get the database handle.
|
|
Release the resources.
|
|
Get the number of the elements of the bucket array.
|
|
Get the number of the used elements of the bucket array.
|
|
Close the database handle.
Implements qdbm::ADBM. |
|
Delete a record.
Implements qdbm::ADBM. |
|
Check whether a fatal error occured or not.
Implements qdbm::ADBM. |
|
Check whether the database has a fatal error or not.
|
|
Get the file descriptor of the database file.
|
|
Fetch a record.
Implements qdbm::ADBM. |
|
Get the first key.
Implements qdbm::ADBM. |
|
Get the size of the database file.
|
|
Retrieve a record.
|
|
Retrieve a record and write the value into a buffer.
|
|
Get the inode number of the database file.
|
|
Initialize the iterator of the database handle.
|
|
Get the next key of the iterator.
|
|
Get the last modified time of the database.
|
|
Get the name of the database.
|
|
Get the next key.
Implements qdbm::ADBM. |
|
Optimize the database.
|
|
Delete a record.
|
|
Store a record.
|
|
Remove a database file.
|
|
Get the number of the records stored in the database.
|
|
Set alignment of the database handle.
|
|
Set the size of the free block pool.
|
|
Retrieve a record directly from a database file.
|
|
Store a record.
Implements qdbm::ADBM. |
|
Synchronize updating contents with the file and the device.
|
|
Get the version information.
|
|
Get the size of the value of a record.
|
|
Check whether the database handle is a writer or not.
|