Skip to content

Commit

Permalink
define where & delete
Browse files Browse the repository at this point in the history
  • Loading branch information
xunkai55-ood committed Jan 9, 2015
1 parent 0643343 commit aaeea6a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions include/ql/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,31 @@ namespace sqleast {
// void execute();
};

/* where item */
struct WhereItem {
CompOp op;
int iValue;
std::string sValue;
AttrType type;
std::string op1;
std::string op2;
int useOp2; // 1 means op1 CompOp op2
};

enum LogicOp {AND_OP, OR_OP};

struct WhereClause {
std::vector<WhereItem> item;
std::vector<LogicOp> op;
// op.size == item.size - 1;
};

/* delete */
struct DeleteQuery {
string relName;
WhereClause where;
};

}
}

Expand Down

0 comments on commit aaeea6a

Please sign in to comment.