|
| virtual | ~ParamDBM ()=default |
| | Destructor. More...
|
| |
| virtual Status | OpenAdvanced (const std::string &path, bool writable, int32_t options=File::OPEN_DEFAULT, const std::map< std::string, std::string > ¶ms={})=0 |
| | Opens a database file, in an advanced way. More...
|
| |
| virtual Status | RebuildAdvanced (const std::map< std::string, std::string > ¶ms={})=0 |
| | Rebuilds the entire database, in an advanced way. More...
|
| |
| virtual Status | SynchronizeAdvanced (bool hard, FileProcessor *proc=nullptr, const std::map< std::string, std::string > ¶ms={})=0 |
| | Synchronizes the content of the database to the file system, in an advanced way. More...
|
| |
| virtual | ~DBM ()=default |
| | Destructor. More...
|
| |
| virtual Status | Open (const std::string &path, bool writable, int32_t options=File::OPEN_DEFAULT)=0 |
| | Opens a database file. More...
|
| |
| virtual Status | Close ()=0 |
| | Closes the database file. More...
|
| |
| virtual Status | Process (std::string_view key, RecordProcessor *proc, bool writable)=0 |
| | Processes a record with a processor. More...
|
| |
| virtual Status | Process (std::string_view key, RecordLambdaType rec_lambda, bool writable) |
| | Processes a record with a lambda function. More...
|
| |
| virtual Status | Get (std::string_view key, std::string *value=nullptr) |
| | Gets the value of a record of a key. More...
|
| |
| virtual std::string | GetSimple (std::string_view key, std::string_view default_value="") |
| | Gets the value of a record of a key, in a simple way. More...
|
| |
| virtual std::map< std::string, std::string > | GetMulti (const std::initializer_list< std::string > &keys) |
| | Gets the values of multiple records of keys. More...
|
| |
| virtual std::map< std::string, std::string > | GetMulti (const std::vector< std::string > &keys) |
| | Gets the values of multiple records of keys, with a vector. More...
|
| |
| virtual Status | Set (std::string_view key, std::string_view value, bool overwrite=true, std::string *old_value=nullptr) |
| | Sets a record of a key and a value. More...
|
| |
| virtual Status | SetMulti (const std::initializer_list< std::pair< std::string, std::string >> &records, bool overwrite=true) |
| | Sets multiple records. More...
|
| |
| virtual Status | SetMulti (const std::map< std::string, std::string > &records, bool overwrite=true) |
| | Sets multiple records, with a map of strings. More...
|
| |
| virtual Status | Remove (std::string_view key, std::string *old_value=nullptr) |
| | Removes a record of a key. More...
|
| |
| virtual Status | Append (std::string_view key, std::string_view value, std::string_view delim="") |
| | Appends data at the end of a record of a key. More...
|
| |
| virtual Status | CompareExchange (std::string_view key, std::string_view expected, std::string_view desired, std::string *actual=nullptr) |
| | Compares the value of a record and exchanges if the condition meets. More...
|
| |
| virtual Status | Increment (std::string_view key, int64_t increment=1, int64_t *current=nullptr, int64_t initial=0) |
| | Increments the numeric value of a record. More...
|
| |
| int64_t | IncrementSimple (std::string_view key, int64_t increment=1, int64_t initial=0) |
| | Increments the numeric value of a record, in a simple way. More...
|
| |
| virtual Status | ProcessEach (RecordProcessor *proc, bool writable)=0 |
| | Processes each and every record in the database with a processor. More...
|
| |
| virtual Status | ProcessEach (RecordLambdaType rec_lambda, bool writable) |
| | Processes each and every record in the database with a lambda function. More...
|
| |
| virtual Status | Count (int64_t *count)=0 |
| | Gets the number of records. More...
|
| |
| virtual int64_t | CountSimple () |
| | Gets the number of records, in a simple way. More...
|
| |
| virtual Status | GetFileSize (int64_t *size)=0 |
| | Gets the current file size of the database. More...
|
| |
| virtual int64_t | GetFileSizeSimple () |
| | Gets the current file size of the database, in a simple way. More...
|
| |
| virtual Status | GetFilePath (std::string *path)=0 |
| | Gets the path of the database file. More...
|
| |
| virtual std::string | GetFilePathSimple () |
| | Gets the path of the database file, in a simple way. More...
|
| |
| virtual Status | Clear ()=0 |
| | Removes all records. More...
|
| |
| virtual Status | Rebuild ()=0 |
| | Rebuilds the entire database. More...
|
| |
| virtual Status | ShouldBeRebuilt (bool *tobe)=0 |
| | Checks whether the database should be rebuilt. More...
|
| |
| virtual bool | ShouldBeRebuiltSimple () |
| | Checks whether the database should be rebuilt, in a simple way. More...
|
| |
| virtual Status | Synchronize (bool hard, FileProcessor *proc=nullptr)=0 |
| | Synchronizes the content of the database to the file system. More...
|
| |
| virtual Status | CopyFile (const std::string &dest_path) |
| | Copies the content of the database file to another file. More...
|
| |
| virtual Status | Export (DBM *dbm) |
| | Exports all records to another database. More...
|
| |
| virtual std::vector< std::pair< std::string, std::string > > | Inspect ()=0 |
| | Inspects the database. More...
|
| |
| virtual bool | IsOpen () const =0 |
| | Checks whether the database is open. More...
|
| |
| virtual bool | IsWritable () const =0 |
| | Checks whether the database is writable. More...
|
| |
| virtual bool | IsHealthy () const =0 |
| | Checks whether the database condition is healthy. More...
|
| |
| virtual bool | IsOrdered () const =0 |
| | Checks whether ordered operations are supported. More...
|
| |
| virtual std::unique_ptr< Iterator > | MakeIterator ()=0 |
| | Makes an iterator for each record. More...
|
| |
| virtual std::unique_ptr< DBM > | MakeDBM () const =0 |
| | Make a new DBM object of the same concrete class. More...
|
| |
Parametric database manager interface.
This is commonly used by the PolyDBM and ShardDBM.