$darkmode
Elektra 0.9.14
|
Provides a merging wrapper around a KDB instance. More...
#include <mergingkdb.hpp>
Public Member Functions | |
int | get (KeySet &returned, std::string const &keyname) override |
Behaves like the KDB get function. More... | |
int | get (KeySet &returned, Key &parentKey) override |
Behaves like the KDB get function. More... | |
virtual int | synchronize (KeySet &returned, std::string const &keyname, ThreeWayMerge &merger) |
Synchronizes the file with the supplied KeySet. More... | |
virtual int | synchronize (KeySet &returned, Key &parentKey, ThreeWayMerge &merger) |
If a conflict occurs during set, the supplied merger is used to resolve the conflict. More... | |
Public Member Functions inherited from kdb::KDB | |
KDB () | |
Constructs a class KDB. More... | |
KDB (Key &errorKey) | |
Constructs a class KDB. More... | |
KDB (KeySet &contract) | |
Constructs a class KDB. More... | |
KDB (KeySet &contract, Key &errorKey) | |
Constructs a class KDB. More... | |
virtual void | open (Key &errorKey) |
Open the database. More... | |
virtual void | open (KeySet &contract, Key &errorKey) |
Open the database. More... | |
virtual void | close () throw () |
Close the database. More... | |
virtual void | close (Key &errorKey) throw () |
Close the database. More... | |
virtual int | set (KeySet &returned, std::string const &keyname) |
Set all keys below keyname. More... | |
virtual int | set (KeySet &returned, Key &parentKey) |
Set all keys below parentKey. More... | |
Provides a merging wrapper around a KDB instance.
The wrapper allows to pass a three way merger instance that is used to resolve conflicts during KDB set.
|
overridevirtual |
|
virtual |
If a conflict occurs during set, the supplied merger is used to resolve the conflict.
If the conflict cannot be solved, an exception is thrown. If the KeySet was successfully written (either by merging or due the absence of a conflict) the supplied KeySet is updated with the new content of the file.
MergingKDBException |
|
virtual |
Synchronizes the file with the supplied KeySet.
If a conflict occurs during set, the supplied merger is used to resolve the conflict. If the conflict cannot be solved, an exception is thrown. If the KeySet was successfully written (either by merging or due the absence of a conflict) the supplied KeySet is updated with the new content of the file.
MergingKDBException |