-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCondition.h
More file actions
37 lines (30 loc) · 941 Bytes
/
Condition.h
File metadata and controls
37 lines (30 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Condition.h
// minisql
//
// Created by 陈泓宇 on 2017/6/19.
// Copyright (c) 2017年 陈泓宇. All rights reserved.
//
#ifndef minisql_Condition_h
#define minisql_Condition_h
#include <string>
#include <sstream>
using namespace std;
class Condition//条件
{
public:
const static int OPERATOR_EQUAL = 0; // "="
const static int OPERATOR_NOT_EQUAL = 1; // "<>"
const static int OPERATOR_LESS = 2; // "<"
const static int OPERATOR_MORE = 3; // ">"
const static int OPERATOR_LESS_EQUAL = 4; // "<="
const static int OPERATOR_MORE_EQUAL = 5; // ">="
Condition(string a,string v,int o);
string attributeName;//关于哪个属性的查询条件
string value; // the value to be compared
int operate; // the type to be compared
bool ifRight(int content);//三种类型的数据比较
bool ifRight(float content);
bool ifRight(string content);
};
#endif