#include <datastore.h>
Collaboration diagram for Constant::Datastore:

Public Member Functions | |
| Datastore () | |
| Datastore (const std::string &filen) | |
| ~Datastore () | |
| std::string | fetch (const std::string &key_val) |
| std::string | fetch_next () |
| void | setdb (const std::string &filen) |
| std::string | operator[] (const std::string &) |
| void | initlog (const std::string &logfilen) |
| void | log (const std::string &, const std::string &) |
| void | commitlog () |
| void | commitlog (const std::string &) |
| void | backupdb () |
| void | dump (const std::string &dumpfilename) |
| std::pair< std::string, std::string > | first () |
| std::pair< std::string, std::string > | next () |
Definition at line 28 of file datastore.h.
|
|
Default constructor. Intialized everything to zero |
|
|
constructor that sets the cdb to be filename
|
|
|
|
|
|
writes a backup of the current database in the form of DBFILENAME. where is the next highest number. It will fill in gaps, if you have backups of 1 2 3 5, the next sequence is 4
|
|
|
Commit log with an argument sets the database to the name given by the argument and commits the log and sets the current database name |
|
|
Commit log writes the information contained in the log to the current database. It does not Add to the current database. This is an atomic replacement |
|
|
dump out the current database in cdbmake format to the filename given by dumpfilename
|
|
|
|
|
|
fetches the next value stored for the previous key |
|
|
returns the first key->value pair in the database and sets things up so you can call next. Returns empty strings in the pair if there is no first key. |
|
|
Open the log and set up for logging operations
|
|
||||||||||||
|
add entry to the log. This takes the key and data string and writes a log entry in cdb_make format |
|
|
returns the next key in the database, used with first. Returns empty strings in the pair at the end. |
|
|
convienince operator to provide DATA = db[KEY] style use |
|
|
|
1.3.6-20040222