aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/query.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-08 16:09:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-08 16:09:08 +0200
commit745e3ddf00303f6fed4e3962647c4eb11ee64816 (patch)
tree3ab2ce1b6709e8d3f8b41b0499cdc58f190110b1 /odb/oracle/query.cxx
parentd20629df902528e9112d146d97e0523104a46619 (diff)
Ground work for multi-database support
All generated code now includes database id. The database-specific database class interface has been updated to include all the database operations. The database-specific tests now use this interface.
Diffstat (limited to 'odb/oracle/query.cxx')
-rw-r--r--odb/oracle/query.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/odb/oracle/query.cxx b/odb/oracle/query.cxx
index e66d9e4..df6a629 100644
--- a/odb/oracle/query.cxx
+++ b/odb/oracle/query.cxx
@@ -21,10 +21,10 @@ namespace odb
{
}
- // query
+ // query_base
//
- query::
- query (const query& q)
+ query_base::
+ query_base (const query_base& q)
: clause_ (q.clause_),
parameters_ (q.parameters_),
bind_ (q.bind_),
@@ -44,8 +44,8 @@ namespace odb
}
}
- query& query::
- operator= (const query& q)
+ query_base& query_base::
+ operator= (const query_base& q)
{
if (this != &q)
{
@@ -62,8 +62,8 @@ namespace odb
return *this;
}
- query& query::
- operator+= (const query& q)
+ query_base& query_base::
+ operator+= (const query_base& q)
{
clause_.insert (clause_.end (), q.clause_.begin (), q.clause_.end ());
@@ -85,7 +85,7 @@ namespace odb
return *this;
}
- void query::
+ void query_base::
append (const string& q)
{
if (!clause_.empty () && clause_.back ().kind == clause_part::native)
@@ -108,7 +108,7 @@ namespace odb
clause_.push_back (clause_part (clause_part::native, q));
}
- void query::
+ void query_base::
append (const char* table, const char* column)
{
string s (table);
@@ -118,7 +118,7 @@ namespace odb
clause_.push_back (clause_part (clause_part::column, s));
}
- void query::
+ void query_base::
add (details::shared_ptr<query_param> p, const char* conv)
{
clause_.push_back (clause_part (clause_part::param));
@@ -137,7 +137,7 @@ namespace odb
p->bind (b);
}
- binding& query::
+ binding& query_base::
parameters_binding () const
{
size_t n (parameters_.size ());
@@ -199,7 +199,7 @@ namespace odb
return false;
}
- void query::
+ void query_base::
optimize ()
{
// Remove a single TRUE literal or one that is followe by one of
@@ -219,7 +219,7 @@ namespace odb
}
}
- const char* query::
+ const char* query_base::
clause_prefix () const
{
if (!clause_.empty ())
@@ -235,7 +235,7 @@ namespace odb
return "";
}
- string query::
+ string query_base::
clause () const
{
string r;
@@ -316,8 +316,8 @@ namespace odb
return clause_prefix () + r;
}
- query
- operator&& (const query& x, const query& y)
+ query_base
+ operator&& (const query_base& x, const query_base& y)
{
// Optimize cases where one or both sides are constant truth.
//
@@ -332,7 +332,7 @@ namespace odb
if (yt)
return x;
- query r ("(");
+ query_base r ("(");
r += x;
r += ") AND (";
r += y;
@@ -340,10 +340,10 @@ namespace odb
return r;
}
- query
- operator|| (const query& x, const query& y)
+ query_base
+ operator|| (const query_base& x, const query_base& y)
{
- query r ("(");
+ query_base r ("(");
r += x;
r += ") OR (";
r += y;
@@ -351,10 +351,10 @@ namespace odb
return r;
}
- query
- operator! (const query& x)
+ query_base
+ operator! (const query_base& x)
{
- query r ("NOT (");
+ query_base r ("NOT (");
r += x;
r += ")";
return r;