A simple in-memory table database focused on maximum performance and reliability. Provided as a dependless library with a simple and beautiful API.
Key features
- The STL strings are used as keys.
- Type safety.
- A custom data type can be used inside the database.
- Supports complex queries and subqueries.
- Full multithreaded code support.
- Using efficient data structures such as hash tables and binary trees to store data.
- CSV support.
- Exceptless code.
Quick start
First of all, download the debug library binaries. After that, write a simple program.
++
#include <MVault.h>
int main()
{
}
A class for storing data with the ability to quickly search for a variety of different keys of any ty...
Definition Vault.h:35
void Print(const bool &isPrintId=false, const std::size_t &amountOfRecords=-1, const 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.
Definition Vault.cpp:797
VaultOperationResult AddKey(const std::string &key, const T &defaultKeyValue, const bool &isUniqueKey, const bool &isUniqueKeyWithoutLambda, const std::function< T(const std::size_t &counter, const VaultRecordRef &ref)> &uniqueKeyFunction) noexcept
Template method to add new key with default value to Vault.
Definition Vault.hpp:325
VaultOperationResult CreateRecord(const std::vector< std::pair< std::string, VaultParamInput > > ¶ms) noexcept
Method to create new VaultRecord.
Definition Vault.cpp:428
Now compile the example using the command:
g++ main.cpp -IMVaultD/include -LMVaultD/lib -lMVault
Call a.out and get the output:
+---+
| A |
+---+
| 0 |
+---+
(1 records)
Guides
See the instructions for installing the library here.
Check the examples of using the library:
- Basic example
- Keys example
- Requests example
FAQ
- How do I display the contents of my class?
To do this, define the ToString function for your type. More information is available here.
- How to use custom class inside vault?
To do this, you need to define a hashing function from std for your data type. More information is available here.