24 while(std::getline(in, line))
26 std::istringstream iss(line);
32 if (command.empty() || command[0] ==
'#')
35 if (command ==
"namespace")
42 command ==
"create_index" ||
43 command ==
"create_unique_index" ||
44 command ==
"create_unordered_index" ||
45 command ==
"create_unordered_unique_index"
50 index.
unique = (command.find(
"unique") != std::string::npos);
51 index.
ordered = (command.find(
"unordered") == std::string::npos);
60 std::istringstream column_ss(s);
64 std::string field_name;
65 if (std::getline(column_ss, field_name,
','))
69 throw Exception(
"Field not found: " + field_name);
80 compiler_options.add_index(std::move(index));
82 else if (command ==
"set_table_storage")
84 std::cerr <<
"Warning: set_table_storage is deprecated\n";
86 else if (command ==
"set_single_row")
90 compiler_options.set_single_row(table_id, value);
93 throw Exception(
"unknown command: " + command);