aboutsummaryrefslogtreecommitdiff
path: root/libcommon/concrete.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-12-13 21:57:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-01-23 21:20:44 +0300
commitfc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch)
tree6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /libcommon/concrete.hxx
parent02367faedb16b6186e8852de47e5b749dc48c2df (diff)
Switch to build2
Diffstat (limited to 'libcommon/concrete.hxx')
-rw-r--r--libcommon/concrete.hxx57
1 files changed, 57 insertions, 0 deletions
diff --git a/libcommon/concrete.hxx b/libcommon/concrete.hxx
new file mode 100644
index 0000000..e0f64a5
--- /dev/null
+++ b/libcommon/concrete.hxx
@@ -0,0 +1,57 @@
+// file : libcommon/concrete.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef LIBCOMMON_CONCRETE_HXX
+#define LIBCOMMON_CONCRETE_HXX
+
+#include <libcommon/config.hxx>
+
+// Namespace alias for the concrete database namespace.
+//
+#if defined(MULTI_DATABASE)
+
+// Fallback to common interface.
+//
+#include <odb/database.hxx>
+#include <odb/transaction.hxx>
+
+namespace odb_db = odb;
+
+#elif defined(DATABASE_MYSQL)
+
+#include <odb/mysql/database.hxx>
+#include <odb/mysql/transaction.hxx>
+
+namespace odb_db = odb::mysql;
+
+#elif defined(DATABASE_SQLITE)
+
+#include <odb/sqlite/database.hxx>
+#include <odb/sqlite/transaction.hxx>
+
+namespace odb_db = odb::sqlite;
+
+#elif defined(DATABASE_PGSQL)
+
+#include <odb/pgsql/database.hxx>
+#include <odb/pgsql/transaction.hxx>
+
+namespace odb_db = odb::pgsql;
+
+#elif defined(DATABASE_ORACLE)
+
+#include <odb/oracle/database.hxx>
+#include <odb/oracle/transaction.hxx>
+
+namespace odb_db = odb::oracle;
+
+#elif defined(DATABASE_MSSQL)
+
+#include <odb/mssql/database.hxx>
+#include <odb/mssql/transaction.hxx>
+
+namespace odb_db = odb::mssql;
+
+#endif
+
+#endif // LIBCOMMON_CONCRETE_HXX