summaryrefslogtreecommitdiff
path: root/template/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'template/driver.cxx')
-rw-r--r--template/driver.cxx38
1 files changed, 0 insertions, 38 deletions
diff --git a/template/driver.cxx b/template/driver.cxx
deleted file mode 100644
index 7160587..0000000
--- a/template/driver.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-// file : template/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include <odb/database.hxx>
-#include <odb/transaction.hxx>
-
-#include "database.hxx" // create_database
-
-#include "person.hxx"
-#include "person-odb.hxx"
-
-using namespace std;
-using namespace odb::core;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- auto_ptr<database> db (create_database (argc, argv));
-
- {
- person p ("John", "Doe", 21);
-
- transaction t (db->begin ());
- db->persist (p);
- t.commit ();
- }
- }
- catch (const odb::exception& e)
- {
- cerr << e.what () << endl;
- return 1;
- }
-}