118 for (
size_t i = 0; i < std::size(check_string); i++)
122 out << check_string[i];
123 if (
size_t(default_content_check) == i)
129 for (
size_t i = 0; i < std::size(db_string); i++)
134 if (
size_t(default_db_type) == i)
139 out <<
"] <file> <connection>\n\n";
141 file_parser.print_help(out);
142 connection_parser.print_help(out);
150 const char *
const *
const argv
156 if (arg_index + 1 < argc && std::strcmp(argv[arg_index],
"--check") == 0)
159 for (
size_t i = 0; i < std::size(check_string); i++)
160 if (std::strcmp(argv[arg_index], check_string[i]) == 0)
164 std::cerr <<
"content_check = " << check_string[int(content_check)] <<
'\n';
166 DB_Type db_type = default_db_type;
167 if (arg_index + 1 < argc && std::strcmp(argv[arg_index],
"--db") == 0)
170 for (
size_t i = 0; i < std::size(db_string); i++)
171 if (std::strcmp(argv[arg_index], db_string[i]) == 0)
175 std::cerr <<
"db_type = " << db_string[int(db_type)] <<
'\n';
187 Connection &connection = connection_parser.build
198 throw Exception(
"server file must be used with a network or ssh connection");
200 std::cerr <<
"Creating client... ";
202 if (db_type == DB_Type::none)
219 else if (db_type == DB_Type::interpreted)
236 else if (db_type == DB_Type::sql)
245 else if (db_type == DB_Type::dump)
254#ifdef PERSISTENCE_TEST
255 else if (db_type == DB_Type::joedb)
257 client.reset(
new Joedb_Client