diff options
Diffstat (limited to 'common/schema/driver.cxx')
-rw-r--r-- | common/schema/driver.cxx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/common/schema/driver.cxx b/common/schema/driver.cxx new file mode 100644 index 0000000..4d27e81 --- /dev/null +++ b/common/schema/driver.cxx @@ -0,0 +1,43 @@ +// file : common/schema/driver.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include <memory> // std::auto_ptr +#include <cassert> +#include <iostream> + +#include <odb/database.hxx> +#include <odb/transaction.hxx> + +#include <common.hxx> + +#include "test.hxx" +#include "test-odb.hxx" + +using namespace std; +using namespace odb; + +using odb::shared_ptr; + +int +main (int argc, char* argv[]) +{ + try + { + auto_ptr<database> db (create_database (argc, argv)); + + // + // + cout << "test 001" << endl; + { + transaction t (db->begin_transaction ()); + t.commit (); + } + } + catch (const odb::exception& e) + { + cerr << e.what () << endl; + return 1; + } +} |