-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_select.cc
54 lines (43 loc) · 1.08 KB
/
test_select.cc
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "Bruinbase.h"
#include "SqlEngine.h"
#include "string.h"
#include "stdio.h"
using namespace std;
int main(){
RC rc;
rc = SqlEngine::load("xsmall","xsmall.del", false);
//rc = SqlEngine::load("small","small.del", true);
//rc = SqlEngine::load("medium","medium.del", true);
//rc = SqlEngine::load("large","large.del", true);
//rc = SqlEngine::load("xlarge","xlarge.del", true);
//if(rc < 0)
// printf("there is an error in LOAD\n");
SelCond a;
a.attr = 1;
a.comp = SelCond::LT;
string a_value = "2500";
a.value = (char*)a_value.c_str();
SelCond b;
b.attr = 1;
b.comp = SelCond::LT;
string b_value = "500";
b.value = (char*)b_value.c_str();
SelCond c;
c.attr = 1;
c.comp = SelCond::GT;
string c_value = "100";
c.value = (char*)c_value.c_str();
SelCond d;
d.attr = 1;
d.comp = SelCond::LT;
string d_value = "400000";
d.value = (char*)d_value.c_str();
std::vector<SelCond> cond;
cond.push_back(a);
//cond.push_back(b);
//cond.push_back(c);
//cond.push_back(d);
//SqlEngine::select(3, "xlarge", cond);
SqlEngine::select(3, "xsmall", cond);
return 0;
}