276
void TableIdentifier::primeLower()
276
void TableIdentifier::init()
278
if (lower_db.empty())
281
lower_table_name.append(table_name);
283
std::transform(lower_table_name.begin(), lower_table_name.end(),
284
lower_table_name.begin(), ::tolower);
286
std::transform(lower_db.begin(), lower_db.end(),
287
lower_db.begin(), ::tolower);
278
lower_table_name.append(table_name);
279
std::transform(lower_table_name.begin(), lower_table_name.end(),
280
lower_table_name.begin(), ::tolower);
292
284
const std::string &TableIdentifier::getPath()
286
assert(not lower_table_name.empty());
294
288
if (path.empty())
298
291
case message::Table::STANDARD:
299
build_table_filename(path, lower_db.c_str(), lower_table_name.c_str(), false);
292
build_table_filename(path, getLower().c_str(), lower_table_name.c_str(), false);
301
294
case message::Table::INTERNAL:
302
build_table_filename(path, lower_db.c_str(), lower_table_name.c_str(), true);
295
build_table_filename(path, getLower().c_str(), lower_table_name.c_str(), true);
304
297
case message::Table::TEMPORARY:
305
298
build_tmptable_filename(path);
307
300
case message::Table::FUNCTION:
301
path.append(getSchemaName());
309
302
path.append(".");
310
303
path.append(table_name);
312
bool TableIdentifier::compare(std::string schema_arg, std::string table_arg)
314
std::transform(schema_arg.begin(), schema_arg.end(),
315
schema_arg.begin(), ::tolower);
317
std::transform(table_arg.begin(), table_arg.end(),
318
table_arg.begin(), ::tolower);
320
if (schema_arg == getLower() && table_arg == lower_table_name)
320
328
const std::string &TableIdentifier::getSQLPath()