diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-05-23 20:51:49 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-05-23 20:51:49 +0200 |
commit | 8bf922f71c0e37ac590f9527a6cf1a6d2cab793c (patch) | |
tree | afa69d9778442c203e604e3cc1dc88cf7a1a97c1 /query.h | |
parent | 91f7a1c413a8be587fdc0b357fe6412e89d16d7d (diff) |
UpdateQuery
Diffstat (limited to 'query.h')
-rw-r--r-- | query.h | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -8,12 +8,12 @@ using namespace std; -struct WhereClause{ +struct ColValueClause{ int col; RowItem value; - WhereClause(void); - WhereClause(const int _c,const RowItem &_v); + ColValueClause(void); + ColValueClause(const int _c,const RowItem &_v); }; @@ -47,7 +47,7 @@ struct CreateQuery : public Query{ struct FindQuery : public Query{ unsigned int limit; //-1=unlimited - vector<WhereClause> where; + vector<ColValueClause> where; FindQuery(void); pair<vector<map<string,Row>::const_iterator>,string> executeIterators(map<string,Table> &tables); @@ -63,8 +63,16 @@ struct InsertQuery : public Query{ QueryResult execute(map<string,Table> &tables); }; +struct UpdateQuery : public Query{ + vector<ColValueClause> where; + vector<ColValueClause> updates; + + UpdateQuery(void); + QueryResult execute(map<string,Table> &tables); +}; + struct DeleteQuery : public Query{ - vector<WhereClause> where; + vector<ColValueClause> where; DeleteQuery(void); QueryResult execute(map<string,Table> &tables); |