aboutsummaryrefslogtreecommitdiff
path: root/qt/database.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'qt/database.hxx')
-rw-r--r--qt/database.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/qt/database.hxx b/qt/database.hxx
index f4060d3..fe815e9 100644
--- a/qt/database.hxx
+++ b/qt/database.hxx
@@ -1,4 +1,4 @@
-// file : qt/database.hxx
+// file : template/database.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
@@ -22,10 +22,12 @@
# include <odb/transaction.hxx>
# include <odb/schema-catalog.hxx>
# include <odb/sqlite/database.hxx>
+#elif defined(DATABASE_PGSQL)
+# include <odb/pgsql/database.hxx>
#endif
inline std::auto_ptr<odb::database>
-createDatabase (int& argc, char* argv[])
+create_database (int& argc, char* argv[])
{
using namespace std;
using namespace odb::core;
@@ -39,6 +41,8 @@ createDatabase (int& argc, char* argv[])
odb::mysql::database::print_usage (cerr);
#elif defined(DATABASE_SQLITE)
odb::sqlite::database::print_usage (cerr);
+#elif defined(DATABASE_PGSQL)
+ odb::pgsql::database::print_usage (cerr);
#endif
exit (0);
@@ -58,6 +62,8 @@ createDatabase (int& argc, char* argv[])
schema_catalog::create_schema (*db);
t.commit ();
}
+#elif defined(DATABASE_PGSQL)
+ auto_ptr<database> db (new odb::pgsql::database (argc, argv));
#endif
return db;