diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-07-21 23:17:02 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-07-21 23:17:02 +0200 |
commit | f5a9d565dad28df86490b392cd5b4d763ab2a248 (patch) | |
tree | ce22e899151902538b5ef38a9c24308ebca8a6dd /boost/pgsql/template/driver.cxx | |
parent | b038ab0cd6335f3e4ec075d1e21f5d7bb89e3ffb (diff) |
Add Boost profile tests for PostgreSQL
Diffstat (limited to 'boost/pgsql/template/driver.cxx')
-rw-r--r-- | boost/pgsql/template/driver.cxx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/boost/pgsql/template/driver.cxx b/boost/pgsql/template/driver.cxx new file mode 100644 index 0000000..e670008 --- /dev/null +++ b/boost/pgsql/template/driver.cxx @@ -0,0 +1,44 @@ +// file : boost/pgsql/template/driver.cxx +// author : Constantin Michael <constantin@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +// PLACE TEST DESCRIPTION HERE +// + +#include <memory> // std::auto_ptr +#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 (int argc, char* argv[]) +{ + try + { + auto_ptr<database> db (create_database (argc, argv)); + + // + // + cout << "test 001" << endl; + { + transaction t (db->begin ()); + t.commit (); + } + } + catch (const odb::exception& e) + { + cerr << e.what () << endl; + return 1; + } +} |