Commit 729da60d authored by yiwenshao's avatar yiwenshao

add template

parent abd03025
......@@ -6,18 +6,14 @@ int
main(int argc,char ** argv) {
big_proxy b("tdb","127.0.0.1","root","letmein",3306);
//std::string query;
//std::getline(std::cin,query);
std::string filename = std::string(cryptdb_dir)+"/"+"sql";
std::cout<<filename<<std::endl;
UNUSED(b);
// while(query != "quit"){
// b.go(query);
// std::getline(std::cin,query);
// }
std::string filename = std::string(cryptdb_dir)+"/input/"+"sql";
std::ifstream infile(filename);
std::string line;
while(std::getline(infile,line)) {
if(line.size()>1) {
b.go(line);
}
}
return 0;
}
show databases;
create database temp;
use temp;
create table student(id integer);
insert into student values(1),(2),(3),(4),(5);
select * from student;
select sum(id) from student;
drop database temp;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment