A Json DataStore Engine written in C++.
Only Header
Import Library.- Direct
JSON
Storage. - File Based Database.
- Extremely light weight.
- Extended With
Cython
to import inPython
.
- JSON for Modern C++
- File Object Wrapper by Aaron McKinney.
GNU GENERAL PUBLIC LICENSE Version 3
#include "Database.h"
using Database = StaticDB::Database;
using namespace std;
int main() {
Database db;
db.open(filename,password);
json j = {
{ "username" , "John Doe"},
{ "type" , "admin"},
};
string key = "user";
db.store(key,j);
db.commit();
db.close();
}
#include "Database.h"
using Database = StaticDB::Database;
using namespace std;
int main() {
Database db;
db.open(filename,password);
string key = "user";
json j = db.fetch(key);
cout << j;
db.close();
}
#include "Database.h"
using Database = StaticDB::Database;
using namespace std;
int main() {
Database db;
db.open(filename,password);
string key = "user";
bool b = db.forget(key);
if(b) cout << "Deleted Succussfully";
db.close();
}
#include "Database.h"
using Database = StaticDB::Database;
using namespace std;
int main() {
Database db;
string query;
db.open(filename,password);
query = " key = { \"Apple\" : 50 } ";
string response = db.execute(query);
cout << response;
db.close();
}