5 #include "share/config.h"
6 #include "API/interface.h"
11 std::string create_table_query =
"CREATE TABLE student "
18 std::string drop_query =
"DROP TABLE student;";
20 std::string select_query =
"SELECT student.name "
22 "WHERE student.name = 'John' "
23 "and student.age > 30 "
24 "and student.teacher = 'Cathy';";
26 std::string delete_query =
"DELETE FROM students WHERE age between 20 and 30;";
28 std::string create_index_query =
"CREATE INDEX name_id on student(name);";
30 std::string insert_query =
"INSERT INTO student(id, name, age)"
31 "VALUES('12789', 'Newman', 20);";
33 std::string update_query =
"update student set name = 'John' where name = 'Cathy';";
35 void build_tiny_sql_folders(){
36 if (!std::filesystem::is_directory(PATH::DATA_PATH)){
37 std::filesystem::create_directory(PATH::DATA_PATH);
39 if (!std::filesystem::is_directory(PATH::RECORD_PATH)){
40 std::filesystem::create_directory(PATH::RECORD_PATH);
42 if (!std::filesystem::is_directory(PATH::INDEX_PATH)){
43 std::filesystem::create_directory(PATH::INDEX_PATH);
45 if (!std::filesystem::is_directory(PATH::CATALOG_PATH)){
46 std::filesystem::create_directory(PATH::CATALOG_PATH);
52 build_tiny_sql_folders();
53 Interface anInterface(std::cin, std::cout);