|
| VaultRecordSet () noexcept |
| Default constructor.
|
|
| VaultRecordSet (const VaultRecordSet &other) noexcept |
| Copy constructor.
|
|
VaultRecordSet & | operator= (const VaultRecordSet &other) noexcept |
| Operator assignment.
|
|
| VaultRecordSet (VaultRecordSet &&other) noexcept |
| Move constructor.
|
|
VaultRecordSet & | operator= (VaultRecordSet &&other) noexcept |
| Move assignment perator.
|
|
bool | GetIsParentVaultValid () const noexcept |
| Method for checking the validity of the parent Vault.
|
|
std::string | GetParentVaultUniqueId () const noexcept |
| Method for getting parent vault unique id.
|
|
bool | IsKeyExist (const std::string &key) const noexcept |
| The method for getting a default key value.
|
|
template<class T > |
VaultOperationResult | GetKeyValue (const std::string &key, T &defaultKeyValue) const noexcept |
| The method for getting a default key value.
|
|
bool | GetKeyType (const std::string &key, std::type_index &keyType) const noexcept |
| The method for getting a key type.
|
|
VaultOperationResult | AddRecord (const VaultRecordRef &recordRef) noexcept |
| Method for adding a record to VaultRecordSet.
|
|
template<class T > |
VaultOperationResult | GetRecord (const std::string &key, const T &keyValue, VaultRecordRef &vaultRecordRef) const noexcept |
| The method for getting a reference to the data inside Vault.
|
|
template<class T > |
VaultOperationResult | GetRecords (const std::string &key, const T &keyValue, std::vector< VaultRecordRef > &recordsRefs, const std::size_t &amountOfRecords=-1) const noexcept |
| The method for getting a vector of references to the data inside Vault.
|
|
template<class T > |
VaultOperationResult | RequestEqual (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const |
| A method for getting all records that have a value equal to keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestGreater (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const |
| A method for getting all records that have a value greater than keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestGreaterOrEqual (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const |
| A method for getting all records that have a value greater than or equal to keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestLess (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const |
| A method for getting all records that have a value less than keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestLessOrEqual (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const |
| A method for getting all records that have a value less than or equal to keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestInterval (const std::string &key, const T &beginKeyValue, const T &endKeyValue, VaultRecordSet &vaultRecordSet, const bool &isIncludeBeginKeyValue=true, const bool &isIncludeEndKeyValue=true, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const |
| The method for getting the result of the request.
|
|
template<VaultRequestType Type> |
VaultOperationResult | Request (const VaultRequest< Type > &&request, VaultRecordSet &vaultRecordSet) const |
| A method for complex requests.
|
|
bool | CheckRecord (const VaultRecordRef &ref) const noexcept |
| A method for checking for an entry in set.
|
|
void | Reset () noexcept |
| Resets the object to its initial state.
|
|
void | Clear () noexcept |
| Clear VaultRecordSet.
|
|
bool | RemoveRecord (const VaultRecordRef &recordRefToErase) noexcept |
| Method for remove a record from a Vault.
|
|
template<class T > |
VaultOperationResult | RemoveRecord (const std::string &key, const T &keyValue) noexcept |
| Method for remove a record from a Vault.
|
|
template<class T > |
VaultOperationResult | RemoveRecords (const std::string &key, const T &keyValue, const std::size_t &amountOfRecords=-1) noexcept |
| The method for remove records using key and value.
|
|
std::size_t | Size () const noexcept |
| Method for getting the number of records.
|
|
std::vector< std::string > | GetKeys () const noexcept |
| The method for getting all the keys.
|
|
std::vector< VaultRecordRef > | GetSortedRecords (const std::string &key, const bool &isReverse=false, const std::size_t &amountOfRecords=-1) const noexcept |
| Method for getting sorted records.
|
|
template<class F > |
void | SortBy (const std::string &key, const F &&func, const bool &isReverse=false, const std::size_t &amountOfRecords=-1) const noexcept |
| Method for handle sorted records.
|
|
std::string | ToJson (const bool &isFormat=false, const std::size_t &tabSize=2, const bool &isUseRecordTemplate=true, const std::string &recordTemplate="Record") const noexcept |
| Method for saving the contents of the VaultRecordSet in json.
|
|
void | PrintSet (const std::size_t &amountOfRecords=-1) const noexcept |
| A method for displaying the contents of a Vault on the screen.
|
|
void | PrintAsTable (bool isPrintId=false, const std::size_t &amountOfRecords=-1, std::string primaryKey="", const bool &isReverse=false, const std::list< std::string > keys={}) const noexcept |
| A method for displaying the contents of a Vault as a table on the screen.
|
|
VaultOperationResult | Join (const VaultRecordSet &a) noexcept |
| A method for adding all records from a to this.
|
|
VaultOperationResult | Exclude (const VaultRecordSet &a) noexcept |
| A method for deleting all records from this that are also in a.
|
|
VaultOperationResult | Intersect (const VaultRecordSet &a) noexcept |
| A method to delete all records from this that are not in a.
|
|
bool | SaveToFile (const std::string &fileName, const std::vector< std::string > keys={}, const std::string &separator=",", const bool &isSaveKey=true) const noexcept |
| A method for saving data to a table file. The file format is csv.
|
|
| ~VaultRecordSet () noexcept |
| Destructor.
|
|
|
enum class | VaultDerivedClasses { VaultBase
, VaultRecordSetDerived
} |
| Enum for storing the object type during inheritance. More...
|
|
template<class T > |
VaultOperationResult | SetDataToRecord (VaultRecord *dataRecord, const std::string &key, const T &data) noexcept |
| Method for setting a new value in VaultRecord and Vault.
|
|
std::unordered_set< VaultRecord * >::iterator | RemoveRecord (VaultRecord *recordToErase, bool *wasDeleted) noexcept |
| Method for removing a record from a Vault.
|
|
template<class T > |
VaultOperationResult | RequestRecordsSet (const VaultRequestType &requestType, const std::string &key, const T &beginKeyValue, const T &endKeyValue, std::unordered_set< VaultRecord * > &recordsSet, const bool &isIncludeBeginKeyValue, const bool &isIncludeEndKeyValue, const std::size_t &amountOfRecords, const std::function< bool(const VaultRecordRef &)> &requestPredicat) const noexcept |
| The method for getting the result of the request in the std::set.
|
|
template<class T > |
VaultOperationResult | RequestRecords (const VaultRequestType &requestType, const std::string &key, const T &beginKeyValue, const T &endKeyValue, VaultRecordSet &vaultRecordSet, const bool &isIncludeBeginKeyValue, const bool &isIncludeEndKeyValue, const std::size_t &amountOfRecords, const std::function< bool(const VaultRecordRef &)> &requestPredicat) const noexcept |
| The method for getting the result of the request.
|
|
template<class T > |
VaultOperationResult | AddKey (const std::string &key, const T &defaultKeyValue, const bool &isUniqueKey, const bool &isUniqueKeyWithoutLambda, std::function< T(std::size_t, const VaultRecordRef &)> uniqueKeyFunction) noexcept |
| Template method to add new key with default value to Vault.
|
|
bool | ReadFile (const std::string &fileName, const bool &isPreprocessRecord, std::function< void(const std::vector< std::string > &, std::vector< std::string > &)> recordHandler, const char &separator, const bool &isLoadKeys, const std::vector< std::string > userKeys) noexcept |
| A method for reading a csv file and loading data from it into memory.
|
|
| Vault () noexcept |
| Default constructor.
|
|
| Vault (const Vault &other) noexcept |
| Copy constructor.
|
|
Vault & | operator= (const Vault &other) noexcept |
| Assignment operator.
|
|
| Vault (Vault &&other) noexcept |
| Move constructor.
|
|
Vault & | operator= (Vault &&other) noexcept |
| Move assignment operator.
|
|
template<class T > |
bool | AddKey (const std::string &key, const T &defaultKeyValue) noexcept |
| Template method to add new key with default value to Vault.
|
|
template<class T > |
VaultOperationResult | AddUniqueKey (const std::string &key) noexcept |
| Template method to add new unique key to Vault.
|
|
template<class T > |
VaultOperationResult | AddUniqueKey (const std::string &key, std::function< T(std::size_t, const VaultRecordRef &)> uniqueKeyFunction) noexcept |
| Template method to add new unique key to Vault.
|
|
template<class T > |
VaultOperationResult | UpdateKey (const std::string &key, const T &defaultKeyValue) noexcept |
| Template method to update default key value.
|
|
bool | IsKeyExist (const std::string &key) const noexcept |
| The method for getting a default key value.
|
|
template<class T > |
VaultOperationResult | GetKeyValue (const std::string &key, T &defaultKeyValue) const noexcept |
| The method for getting a default key value.
|
|
bool | GetKeyType (const std::string &key, std::type_index &keyType) const noexcept |
| The method for getting a key type.
|
|
std::vector< std::string > | GetKeys () const noexcept |
| The method for getting all the keys.
|
|
std::vector< std::string > | GetUniqueKeys () const noexcept |
| The method for getting the unique keys.
|
|
bool | RemoveKey (const std::string &key) noexcept |
| The method for deleting the key.
|
|
VaultOperationResult | CreateRecord (const std::vector< std::pair< std::string, VaultParamInput > > ¶ms) noexcept |
| Method to create new VaultRecord.
|
|
VaultOperationResult | CreateRecord (VaultRecordRef &vaultRecordRef, const std::vector< std::pair< std::string, VaultParamInput > > ¶ms) noexcept |
| Method to create new VaultRecord.
|
|
template<class T > |
VaultOperationResult | GetRecord (const std::string &key, const T &keyValue, VaultRecordRef &vaultRecordRef) const noexcept |
| The method for getting a reference to the data inside Vault.
|
|
template<class T > |
VaultOperationResult | GetRecords (const std::string &key, const T &keyValue, std::vector< VaultRecordRef > &recordsRefs, const std::size_t &amountOfRecords=-1) const noexcept |
| The method for getting a vector of references to the data inside Vault.
|
|
template<class T > |
VaultOperationResult | RequestEqual (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const noexcept |
| A method for getting all records that have a value equal to keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestGreater (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const noexcept |
| A method for getting all records that have a value greater than keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestGreaterOrEqual (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const noexcept |
| A method for getting all records that have a value greater than or equal to keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestLess (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const noexcept |
| A method for getting all records that have a value less than keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestLessOrEqual (const std::string &key, const T &keyValue, VaultRecordSet &vaultRecordSet, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const noexcept |
| A method for getting all records that have a value less than or equal to keyValue stored by the key key.
|
|
template<class T > |
VaultOperationResult | RequestInterval (const std::string &key, const T &beginKeyValue, const T &endKeyValue, VaultRecordSet &vaultRecordSet, const bool &isIncludeBeginKeyValue=true, const bool &isIncludeEndKeyValue=true, const std::size_t &amountOfRecords=-1, const std::function< bool(const VaultRecordRef &)> &requestPredicat=DefaultRequestPredicat) const noexcept |
| The method for getting the result of the request.
|
|
template<VaultRequestType Type> |
VaultOperationResult | Request (const VaultRequest< Type > &&request, VaultRecordSet &vaultRecordSet) const |
| A method for complex requests.
|
|
void | DropVault () noexcept |
| A method for deleting all data and keys.
|
|
void | DropData () noexcept |
| A method for deleting all data, but keeping all keys.
|
|
bool | EraseRecord (const VaultRecordRef &recordRefToErase) noexcept |
| Method for deleting a record from a Vault.
|
|
template<class T > |
VaultOperationResult | EraseRecord (const std::string &key, const T &keyValue) noexcept |
| The method for erase record using key and value.
|
|
template<class T > |
VaultOperationResult | EraseRecords (const std::string &key, const T &keyValue, const std::size_t &amountOfRecords=-1) noexcept |
| The method for erase records using key and value.
|
|
std::size_t | Size () const noexcept |
| Method for getting the number of records.
|
|
std::vector< VaultRecordRef > | GetSortedRecords (const std::string &key, const bool &isReverse=false, const std::size_t &amountOfRecords=-1) const noexcept |
| Method for getting sorted records.
|
|
template<class F > |
void | SortBy (const std::string &key, const F &&func, const bool &isReverse=false, const std::size_t &amountOfRecords=-1) const noexcept |
| Method for handle sorted records.
|
|
std::string | ToJson (const bool &isFormat=false, const std::size_t &tabSize=2, const bool &isUseRecordTemplate=true, const std::string &recordTemplate="Record") const noexcept |
| Method for saving the contents of the Vault in json.
|
|
void | PrintVault (const std::size_t &amountOfRecords=-1) const noexcept |
| A method for displaying the contents of a Vault on the screen.
|
|
void | PrintAsTable (bool isPrintId=false, const std::size_t &amountOfRecords=-1, std::string primaryKey="", const bool &isReverse=false, const std::list< std::string > keys={}) const noexcept |
| A method for displaying the contents of a Vault as a table on the screen.
|
|
bool | SaveToFile (const std::string &fileName, const std::vector< std::string > keys={}, const std::string &separator=",", const bool &isSaveKey=true) const noexcept |
| A method for saving data to a table file. The file format is csv.
|
|
bool | ReadFile (const std::string &fileName, const char &separator=',', const bool &isLoadKeys=true, const std::vector< std::string > keys={}) noexcept |
| A method for reading a csv file and loading data from it into memory.
|
|
bool | ReadFile (const std::string &fileName, const char &separator, const bool &isLoadKeys, std::function< void(const std::vector< std::string > &, std::vector< std::string > &)> recordHandler) noexcept |
| A method for reading a csv file and loading data from it into memory.
|
|
std::vector< std::pair< std::size_t, std::string > > | GetErrorsInLastReadedFile () const noexcept |
| A method for getting errors in the last read file.
|
|
| ~Vault () noexcept |
| Default destructor.
|
|
VaultDerivedClasses | VaultDerivedClass |
| A variable for storing the object type in the Vault inheritance tree.
|
|
std::unordered_set< VaultRecord * > | RecordsSet |
| Unordered set with all VaultRecord pointers.
|
|
std::unordered_set< VaultRecordSet * > | RecordSetsSet |
| Unordered set with all VaultRecordSet pointers.
|
|
friend | VaultRecordRef |
| Making the VaultRecordRef class friendly so that it has access to the internal members of the Vault class.
|
|
friend | VaultRecordSet |
| Making the VaultRecordSet class friendly so that it has access to the internal members of the Vault class.
|
|
A class for storing query results.
The class inherits from Vault, but does not provide functionality for working with keys and creating new records. No new records will be created during the request, and this class will only store pointers to records in the original Vault.