aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/query.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pgsql/query.cxx')
-rw-r--r--odb/pgsql/query.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/odb/pgsql/query.cxx b/odb/pgsql/query.cxx
index 6c0bd4c..2233110 100644
--- a/odb/pgsql/query.cxx
+++ b/odb/pgsql/query.cxx
@@ -23,10 +23,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_),
@@ -63,8 +63,8 @@ namespace odb
}
}
- query& query::
- operator= (const query& q)
+ query_base& query_base::
+ operator= (const query_base& q)
{
if (this != &q)
{
@@ -104,8 +104,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 ());
@@ -153,7 +153,7 @@ namespace odb
return *this;
}
- void query::
+ void query_base::
append (const string& q)
{
if (!clause_.empty () && clause_.back ().kind == clause_part::native)
@@ -176,7 +176,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);
@@ -186,7 +186,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));
@@ -222,7 +222,7 @@ namespace odb
statement::bind_param (native_binding_, binding_);
}
- native_binding& query::
+ native_binding& query_base::
parameters_binding () const
{
size_t n (parameters_.size ());
@@ -291,7 +291,7 @@ namespace odb
return false;
}
- void query::
+ void query_base::
optimize ()
{
// Remove a single TRUE literal or one that is followe by one of
@@ -311,7 +311,7 @@ namespace odb
}
}
- const char* query::
+ const char* query_base::
clause_prefix () const
{
if (!clause_.empty ())
@@ -327,7 +327,7 @@ namespace odb
return "";
}
- string query::
+ string query_base::
clause () const
{
string r;
@@ -404,8 +404,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.
//
@@ -420,7 +420,7 @@ namespace odb
if (yt)
return x;
- query r ("(");
+ query_base r ("(");
r += x;
r += ") AND (";
r += y;
@@ -428,10 +428,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;
@@ -439,10 +439,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;