aboutsummaryrefslogtreecommitdiff
path: root/hello/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-28 20:14:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-28 20:14:08 +0200
commit8ce82c7b864d7299008dd413417a5823a7d747f5 (patch)
treef9612574c908d98585646f7245f8a078f15f856b /hello/driver.cxx
parente4add374a96fdcb16fe9a8edc69f8a7418884e82 (diff)
Rename begin_transaction() to begin()
Diffstat (limited to 'hello/driver.cxx')
-rw-r--r--hello/driver.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/hello/driver.cxx b/hello/driver.cxx
index e7bc114..ad4ef57 100644
--- a/hello/driver.cxx
+++ b/hello/driver.cxx
@@ -32,7 +32,7 @@ main (int argc, char* argv[])
person jane ("Jane", "Doe", 32);
person joe ("Joe", "Dirt", 30);
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
db->persist (john);
db->persist (jane);
@@ -53,7 +53,7 @@ main (int argc, char* argv[])
// Say hello to those over 30.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (db->query<person> (query::age > 30));
@@ -68,7 +68,7 @@ main (int argc, char* argv[])
// Joe Dirt just had a birthday, so update his age.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
auto_ptr<person> joe (db->load<person> (joe_id));
joe->age (joe->age () + 1);
@@ -81,7 +81,7 @@ main (int argc, char* argv[])
//
/*
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (db->query<person> (query::first == "Joe" &&
query::last == "Dirt"));
@@ -103,7 +103,7 @@ main (int argc, char* argv[])
// John Doe is no longer in our database.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
db->erase<person> (john_id);
t.commit ();
}