aboutsummaryrefslogtreecommitdiff
path: root/enginedata.cpp
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-05-22 21:13:51 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-05-22 21:13:51 +0200
commit059a8baa815f0b50d11546ad26b854572ef52182 (patch)
tree87009b91f388e7a6603c6c409941e371b22d35d3 /enginedata.cpp
parent675e8972384e808f2b622922df5e8deef418e165 (diff)
CreateQuery, InsertQuery, add message in QueryResult
Diffstat (limited to 'enginedata.cpp')
-rw-r--r--enginedata.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/enginedata.cpp b/enginedata.cpp
index 95a2b11..fb60521 100644
--- a/enginedata.cpp
+++ b/enginedata.cpp
@@ -6,6 +6,7 @@
using namespace std;
+Row::Row(void):nc(0),table(NULL){}
Row::Row(const int _nc,const Table *const _t):nc(_nc),table(_t){
items=new RowItem[nc];
}
@@ -30,7 +31,6 @@ ostream& operator<<(ostream &os,const Row &r){
}
-//copies from _hd, so you can freely delete or edit the passed colheader array
Table::Table(const string &_n,const int _nc,const ColHeader *const _hd):name(_n),nc(_nc){
header=new ColHeader[nc];
memcpy(header,_hd,nc*sizeof(ColHeader));
@@ -45,16 +45,6 @@ Table::Table(Table &&other):name(move(other.name)),nc(other.nc),header(other.hea
other.header=nullptr;
}
-bool Table::insert(Row &&row){
- string key=serialise(this->header[0],row.items[0]);
- cerr<<debug<<"Inserting into table '"<<this->name<<"' key="<<key<<" row="<<row<<endl;
- return rows.emplace(key,move(row)).second;
-}
-bool Table::insert(Row &row){
- string key=serialise(this->header[0],row.items[0]);
- cerr<<debug<<"Inserting into table '"<<this->name<<"' key="<<key<<" row="<<row<<endl;
- return rows.emplace(key,row).second;
-}
string serialise(const ColHeader &header,const RowItem &rowitem){