24 while(std::getline(in, line))
26 std::istringstream iss(line);
32 if (command.empty() || command[0] ==
'#')
35 if (command ==
"namespace")
41 else if (command ==
"create_index" || command ==
"create_unique_index")
45 index.
unique = (command ==
"create_unique_index");
47 std::vector<std::string> index_columns;
56 std::istringstream column_ss(s);
60 if (std::getline(column_ss, column,
','))
61 index_columns.emplace_back(std::move(column));
70 for (
auto field_name: index_columns)
74 throw Exception(
"Field not found: " + field_name);
78 compiler_options.add_index(std::move(index));
80 else if (command ==
"set_table_storage")
82 std::cerr <<
"Warning: set_table_storage is deprecated\n";
84 else if (command ==
"set_single_row")
88 compiler_options.set_single_row(table_id, value);
91 throw Exception(
"unknown command: " + command);