aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/query.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-29 16:33:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-29 16:33:00 +0200
commit14d0ecab529bc46ebadd319cd4dbc1c99bb53e6b (patch)
tree120e06f918a0880ff7216cc056c79ade1fbe9a94 /odb/sqlite/query.cxx
parent8cd01a51f0a5d5c8c988f831ba3315a058e7fe8e (diff)
Don't use boolean as identifier2.2.0.a1
Some headers/systems defined it as a macro.
Diffstat (limited to 'odb/sqlite/query.cxx')
-rw-r--r--odb/sqlite/query.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/odb/sqlite/query.cxx b/odb/sqlite/query.cxx
index 2a1c203..30e54f5 100644
--- a/odb/sqlite/query.cxx
+++ b/odb/sqlite/query.cxx
@@ -148,7 +148,8 @@ namespace odb
void query_base::
append (const string& q)
{
- if (!clause_.empty () && clause_.back ().kind == clause_part::native)
+ if (!clause_.empty () &&
+ clause_.back ().kind == clause_part::kind_native)
{
string& s (clause_.back ().part);
@@ -165,7 +166,7 @@ namespace odb
s += q;
}
else
- clause_.push_back (clause_part (clause_part::native, q));
+ clause_.push_back (clause_part (clause_part::kind_native, q));
}
void query_base::
@@ -175,13 +176,13 @@ namespace odb
s += '.';
s += column;
- clause_.push_back (clause_part (clause_part::column, s));
+ clause_.push_back (clause_part (clause_part::kind_column, s));
}
void query_base::
add (details::shared_ptr<query_param> p, const char* conv)
{
- clause_.push_back (clause_part (clause_part::param));
+ clause_.push_back (clause_part (clause_part::kind_param));
if (conv != 0)
clause_.back ().part = conv;
@@ -229,12 +230,12 @@ namespace odb
//
clause_type::iterator i (clause_.begin ()), e (clause_.end ());
- if (i != e && i->kind == clause_part::boolean && i->bool_part)
+ if (i != e && i->kind == clause_part::kind_bool && i->bool_part)
{
clause_type::iterator j (i + 1);
if (j == e ||
- (j->kind == clause_part::native && check_prefix (j->part)))
+ (j->kind == clause_part::kind_native && check_prefix (j->part)))
clause_.erase (i);
}
}
@@ -246,7 +247,7 @@ namespace odb
{
const clause_part& p (clause_.front ());
- if (p.kind == clause_part::native && check_prefix (p.part))
+ if (p.kind == clause_part::kind_native && check_prefix (p.part))
return "";
return "WHERE ";
@@ -269,7 +270,7 @@ namespace odb
switch (i->kind)
{
- case clause_part::column:
+ case clause_part::kind_column:
{
if (last != ' ' && last != '(')
r += ' ';
@@ -277,7 +278,7 @@ namespace odb
r += i->part;
break;
}
- case clause_part::param:
+ case clause_part::kind_param:
{
if (last != ' ' && last != '(')
r += ' ';
@@ -298,7 +299,7 @@ namespace odb
break;
}
- case clause_part::native:
+ case clause_part::kind_native:
{
// We don't want extra spaces after '(' as well as before ','
// and ')'.
@@ -313,7 +314,7 @@ namespace odb
r += p;
break;
}
- case clause_part::boolean:
+ case clause_part::kind_bool:
{
if (last != ' ' && last != '(')
r += ' ';