diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-05-23 18:49:59 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-05-23 18:49:59 +0200 |
commit | 91140dcb42f441f8883b204fdfea367c133def9e (patch) | |
tree | e22aee085d61b4af4590e24bf5a8e58c6a7f3f49 /engine.cpp | |
parent | 059a8baa815f0b50d11546ad26b854572ef52182 (diff) |
Bugfixing
Diffstat (limited to 'engine.cpp')
-rw-r--r-- | engine.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -46,7 +46,7 @@ int main(int argc,char **argv){ row.items[0].rh_int32=UINT_MAX; row.items[1].rh_uint32=UINT_MAX; row.items[2].rh_bytes=new unsigned char[10]; - strcpy((char*)row.items[2].rh_bytes,"hallo daar"); + memcpy((char*)row.items[2].rh_bytes,"hallo daar",10); InsertQuery iqu(move(row)); iqu.tablename="hoi"; @@ -56,12 +56,20 @@ int main(int argc,char **argv){ cout<<"Insert, Result: "<<res.res<<": (msg=\""<<res.msg<<"\")"<<endl; for(const Row &r : res.rows)cout<<"- "<<r<<endl; + iqu.row.items[0].rh_int32=42; + memcpy((char*)iqu.row.items[2].rh_bytes,"doei!\0\0\0\0",10); + + res=iqu.execute(tables); + + cout<<"Insert, Result: "<<res.res<<": (msg=\""<<res.msg<<"\")"<<endl; + for(const Row &r : res.rows)cout<<"- "<<r<<endl; + cout<<"hoitb has "<<hoitb->rows.size()<<" row"<<(hoitb->rows.size()==1?"":"s")<<'.'<<endl; FindQuery fqu; fqu.tablename="hoi"; - RowItem ri; ri.rh_int32=-1; - fqu.where.emplace_back(0,ri); + RowItem ri; ri.rh_uint32=UINT_MAX; + fqu.where.emplace_back(1,ri); res=fqu.execute(tables); |