diff options
Diffstat (limited to 'odb-tests/libcommon/common.cxx')
-rw-r--r-- | odb-tests/libcommon/common.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/odb-tests/libcommon/common.cxx b/odb-tests/libcommon/common.cxx index ba2e5da..0e6fe55 100644 --- a/odb-tests/libcommon/common.cxx +++ b/odb-tests/libcommon/common.cxx @@ -350,6 +350,26 @@ create_database (int argc, #endif } +#ifndef MULTI_DATABASE +std::string +quote_name (const std::string& name) +{ +#if defined(DATABASE_MYSQL) + return '`' + name + '`'; +#elif defined(DATABASE_SQLITE) + return '"' + name + '"'; +#elif defined(DATABASE_PGSQL) + return '"' + name + '"'; +#elif defined(DATABASE_ORACLE) + return '"' + name + '"'; +#elif defined(DATABASE_MSSQL) + return '[' + name + ']'; +#else +# error unknown database +#endif +} +#endif + bool size_available () { |