diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-28 20:14:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-28 20:14:08 +0200 |
commit | 23bdd06c5ec17206d2dfb75ad55b3c613921dce7 (patch) | |
tree | 27585a15ff7e7d15e8c5de655571b35669e23fbd /common | |
parent | 125f9cbb22ab368f40b93bc3013846b812124b02 (diff) |
Rename begin_transaction() to begin()
Diffstat (limited to 'common')
-rw-r--r-- | common/auto/driver.cxx | 4 | ||||
-rw-r--r-- | common/lifecycle/driver.cxx | 16 | ||||
-rw-r--r-- | common/query/driver.cxx | 28 | ||||
-rw-r--r-- | common/schema/driver.cxx | 2 | ||||
-rw-r--r-- | common/template/driver.cxx | 2 | ||||
-rw-r--r-- | common/threads/driver.cxx | 10 |
6 files changed, 31 insertions, 31 deletions
diff --git a/common/auto/driver.cxx b/common/auto/driver.cxx index 4a65725..d912ad9 100644 --- a/common/auto/driver.cxx +++ b/common/auto/driver.cxx @@ -34,7 +34,7 @@ main (int argc, char* argv[]) object o2 ("two"); object o3 ("three"); - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); db->persist (o1); db->persist (o2); db->persist (o3); @@ -50,7 +50,7 @@ main (int argc, char* argv[]) } { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o1 (db->load<object> (id1)); auto_ptr<object> o2 (db->load<object> (id2)); auto_ptr<object> o3 (db->load<object> (id3)); diff --git a/common/lifecycle/driver.cxx b/common/lifecycle/driver.cxx index 5518a40..f836a2b 100644 --- a/common/lifecycle/driver.cxx +++ b/common/lifecycle/driver.cxx @@ -32,7 +32,7 @@ main (int argc, char* argv[]) // try { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o (db->load<object> (1)); assert (false); t.commit (); @@ -47,13 +47,13 @@ main (int argc, char* argv[]) object o (1); o.str_ = "value 1"; - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); db->persist (o); t.commit (); try { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); db->persist (o); assert (false); t.commit (); @@ -64,7 +64,7 @@ main (int argc, char* argv[]) } { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o (db->load<object> (1)); assert (o->str_ == "value 1"); t.commit (); @@ -73,7 +73,7 @@ main (int argc, char* argv[]) // modified // { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o (db->load<object> (1)); o->str_ = "value 2"; db->update (*o); @@ -81,7 +81,7 @@ main (int argc, char* argv[]) } { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o (db->load<object> (1)); assert (o->str_ == "value 2"); t.commit (); @@ -90,7 +90,7 @@ main (int argc, char* argv[]) // transient // { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o (db->load<object> (1)); db->erase (*o); t.commit (); @@ -98,7 +98,7 @@ main (int argc, char* argv[]) try { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); auto_ptr<object> o (db->load<object> (1)); assert (false); t.commit (); diff --git a/common/query/driver.cxx b/common/query/driver.cxx index 7e64ca3..0c299f2 100644 --- a/common/query/driver.cxx +++ b/common/query/driver.cxx @@ -55,7 +55,7 @@ main (int argc, char* argv[]) person p4 (4, "Johansen", "Johansen", 32, false); p4.middle_name_.reset (new string ("J")); - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); db->persist (p1); db->persist (p2); db->persist (p3); @@ -90,7 +90,7 @@ main (int argc, char* argv[]) // cout << "test 001" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> ()); for (result::iterator i (r.begin ()); i != r.end (); ++i) @@ -107,7 +107,7 @@ main (int argc, char* argv[]) // cout << "test 002" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> ("ORDER BY age")); for (result::iterator i (r.begin ()); i != r.end (); ++i) @@ -131,7 +131,7 @@ main (int argc, char* argv[]) // cout << "test 003" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> ("age >= 30 AND last = 'Doe'")); print (r); t.commit (); @@ -141,7 +141,7 @@ main (int argc, char* argv[]) // cout << "test 004" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); const char* name = "Doe"; @@ -158,7 +158,7 @@ main (int argc, char* argv[]) // cout << "test 005" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); string name; unsigned short age; @@ -236,7 +236,7 @@ main (int argc, char* argv[]) // cout << "test 006" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> (query::middle_name.is_null ())); print (r); r = db->query<person> (query::middle_name.is_not_null ()); @@ -248,7 +248,7 @@ main (int argc, char* argv[]) // cout << "test 007" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> (query::married)); print (r); r = db->query<person> (!query::married); @@ -262,7 +262,7 @@ main (int argc, char* argv[]) { string name ("Dirt"); - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> (query::last_name == "Doe")); print (r); r = db->query<person> (query::last_name == query::_val (name)); @@ -278,7 +278,7 @@ main (int argc, char* argv[]) // cout << "test 009" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); // == // @@ -317,7 +317,7 @@ main (int argc, char* argv[]) // cout << "test 010" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); // && // @@ -353,7 +353,7 @@ main (int argc, char* argv[]) // cout << "test 011" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> (query::first_name.in ("John", "Jane"))); print (r); @@ -368,7 +368,7 @@ main (int argc, char* argv[]) // cout << "test 012" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> (query::first_name == query::last_name)); print (r); t.commit (); @@ -378,7 +378,7 @@ main (int argc, char* argv[]) // cout << "test 013" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<person> (query::middle_name == "Squeaky")); print (r); t.commit (); diff --git a/common/schema/driver.cxx b/common/schema/driver.cxx index e189b23..74321e3 100644 --- a/common/schema/driver.cxx +++ b/common/schema/driver.cxx @@ -32,7 +32,7 @@ main (int argc, char* argv[]) // cout << "test 001" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); t.commit (); } } diff --git a/common/template/driver.cxx b/common/template/driver.cxx index 495365b..8fc92b8 100644 --- a/common/template/driver.cxx +++ b/common/template/driver.cxx @@ -32,7 +32,7 @@ main (int argc, char* argv[]) // cout << "test 001" << endl; { - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); t.commit (); } } diff --git a/common/threads/driver.cxx b/common/threads/driver.cxx index 14ca172..bbd0ac0 100644 --- a/common/threads/driver.cxx +++ b/common/threads/driver.cxx @@ -50,7 +50,7 @@ struct task object o2 (id + 1, "second object"); object o3 (id + 2, "third object"); - transaction t (db_.begin_transaction ()); + transaction t (db_.begin ()); db_.persist (o1); db_.persist (o2); db_.persist (o3); @@ -58,7 +58,7 @@ struct task } { - transaction t (db_.begin_transaction ()); + transaction t (db_.begin ()); auto_ptr<object> o (db_.load<object> (id)); assert (o->str_ == "frist object"); o->str_ = "another value"; @@ -70,7 +70,7 @@ struct task typedef odb::query<object> query; typedef odb::result<object> result; - transaction t (db_.begin_transaction ()); + transaction t (db_.begin ()); result r (db_.query<object> (query::str == "another value", false)); bool found (false); @@ -87,7 +87,7 @@ struct task } { - transaction t (db_.begin_transaction ()); + transaction t (db_.begin ()); db_.erase<object> (id); t.commit (); } @@ -134,7 +134,7 @@ test (int argc, char* argv[], size_t max_connections) { typedef odb::result<object> result; - transaction t (db->begin_transaction ()); + transaction t (db->begin ()); result r (db->query<object> ()); for (result::iterator i (r.begin ()); i != r.end (); ++i) |