aboutsummaryrefslogtreecommitdiff
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
parente4add374a96fdcb16fe9a8edc69f8a7418884e82 (diff)
Rename begin_transaction() to begin()
-rw-r--r--hello/driver.cxx10
-rw-r--r--mapping/driver.cxx4
-rw-r--r--query/driver.cxx12
-rw-r--r--template/driver.cxx2
4 files changed, 14 insertions, 14 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 ();
}
diff --git a/mapping/driver.cxx b/mapping/driver.cxx
index fd878dc..dae2c94 100644
--- a/mapping/driver.cxx
+++ b/mapping/driver.cxx
@@ -28,7 +28,7 @@ main (int argc, char* argv[])
person jane ("Jane", "Doe", date (1975, 11, 23), false);
person joe ("Joe", "Dirt", date (1973, 12, 28), true);
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
db->persist (john);
db->persist (jane);
@@ -41,7 +41,7 @@ main (int argc, char* argv[])
typedef odb::query<person> query;
typedef odb::result<person> result;
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (db->query<person> (query::married &&
query::born == date (1978, 10, 13)));
diff --git a/query/driver.cxx b/query/driver.cxx
index 15f6129..5b7c926 100644
--- a/query/driver.cxx
+++ b/query/driver.cxx
@@ -52,7 +52,7 @@ main (int argc, char* argv[])
p.push_back (person ("Jane", "Doe", 23));
p.push_back (person ("Jane", "Smith", 24));
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
for (people::iterator i (p.begin ()); i != p.end (); ++i)
db->persist (*i);
@@ -63,7 +63,7 @@ main (int argc, char* argv[])
// A simple query and result handling.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (db->query<person> (query::age < 30));
@@ -103,7 +103,7 @@ main (int argc, char* argv[])
// as well as use paranthesis to control evaluation order.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (
db->query<person> (
@@ -117,7 +117,7 @@ main (int argc, char* argv[])
// Query that shows how to use by-reference parameter binding.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
unsigned short lower, upper;
@@ -144,7 +144,7 @@ main (int argc, char* argv[])
// Query that shows how to use the in() function.
//
{
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (
db->query<person> (
@@ -164,7 +164,7 @@ main (int argc, char* argv[])
names.push_back ("Johnson");
names.push_back ("Jockson");
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
result r (
db->query<person> (
diff --git a/template/driver.cxx b/template/driver.cxx
index a5b5714..387035d 100644
--- a/template/driver.cxx
+++ b/template/driver.cxx
@@ -26,7 +26,7 @@ main (int argc, char* argv[])
{
person p ("John", "Doe", 21);
- transaction t (db->begin_transaction ());
+ transaction t (db->begin ());
db->persist (p);
t.commit ();
}