From 8b94c3bf3a06caa7b003fe61e8242bdb00004eb5 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 14 May 2018 00:20:11 +0200 Subject: Replace files with sqlite Using sqlite because sqlite has transactions, storing/loading from files automatically, unloading data that is not accessed often. Removed cosmetic data (node name, username). They can be added using addData by the application that uses odhtdb instead. Database callback functions can now be called with stored data using database.loadNode function. TODO: Add local user storage (with password) back, it has been temorary disabled --- src/Group.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/Group.cpp') diff --git a/src/Group.cpp b/src/Group.cpp index 4210142..9db3e4e 100644 --- a/src/Group.cpp +++ b/src/Group.cpp @@ -6,12 +6,9 @@ using namespace std; namespace odhtdb { - Group::Group(const string &_name, uint8_t _id[GROUP_ID_LENGTH], const Permission &_permission) : - name(_name), + Group::Group(uint8_t _id[GROUP_ID_LENGTH], const Permission &_permission) : permission(_permission) { - if(name.size() > 255) - throw GroupNameTooLongException(name); memcpy(id, _id, GROUP_ID_LENGTH); } @@ -37,11 +34,6 @@ namespace odhtdb } return false; } - - const string& Group::getName() const - { - return name; - } DataView Group::getId() const { -- cgit v1.2.3