diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-04-29 18:55:24 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-03 14:33:32 +0300 |
commit | 41727cc1aa49780199f50291f82653a721a5a304 (patch) | |
tree | 6c99e481a4492eed10552c2ef8db88323083775d /odb-tests/libcommon/common.cxx | |
parent | 68ff3d1fa1c8eb86bf89b7b9cbad78a45f362672 (diff) |
Add support for testing of libodb-oracle to odb-tests
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 () { |