diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-07-25 11:32:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-07-25 11:32:54 +0200 |
commit | fa31e7c6a729a5e9772bfd775d19501996652f30 (patch) | |
tree | ab229424af42249109be404c9c22d02f98efe1fe /pgsql/template/driver.cxx | |
parent | 4f59995242d894baa041a8171d420a18b43ceb8c (diff) |
Fix PostgreSQL test template to do the same as in other databases
Diffstat (limited to 'pgsql/template/driver.cxx')
-rw-r--r-- | pgsql/template/driver.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/pgsql/template/driver.cxx b/pgsql/template/driver.cxx index 755aaeb..329c91c 100644 --- a/pgsql/template/driver.cxx +++ b/pgsql/template/driver.cxx @@ -9,17 +9,35 @@ #include <cassert> #include <iostream> +#include <odb/pgsql/database.hxx> +#include <odb/pgsql/transaction.hxx> + +#include <common/common.hxx> + +#include "test.hxx" +#include "test-odb.hxx" + using namespace std; +using namespace odb::core; int -main () +main (int argc, char* argv[]) { try { + auto_ptr<database> db (create_database (argc, argv)); + + // + // cout << "test 001" << endl; + { + transaction t (db->begin ()); + t.commit (); + } } - catch (...) + catch (const odb::exception& e) { + cerr << e.what () << endl; return 1; } } |