aboutsummaryrefslogtreecommitdiff
path: root/common/query
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
commit23bdd06c5ec17206d2dfb75ad55b3c613921dce7 (patch)
tree27585a15ff7e7d15e8c5de655571b35669e23fbd /common/query
parent125f9cbb22ab368f40b93bc3013846b812124b02 (diff)
Rename begin_transaction() to begin()
Diffstat (limited to 'common/query')
-rw-r--r--common/query/driver.cxx28
1 files changed, 14 insertions, 14 deletions
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 ();