aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/query.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/sqlite/query.cxx')
-rw-r--r--odb/sqlite/query.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/odb/sqlite/query.cxx b/odb/sqlite/query.cxx
index 120be98..fc1a046 100644
--- a/odb/sqlite/query.cxx
+++ b/odb/sqlite/query.cxx
@@ -159,8 +159,8 @@ namespace odb
// We don't want extra spaces after '(' as well as before ','
// and ')'.
//
- if (last != ' ' && last != '(' &&
- first != ' ' && first != ',' && first != ')')
+ if (last != ' ' && last != '\n' && last != '(' &&
+ first != ' ' && first != '\n' && first != ',' && first != ')')
s += ' ';
s += q;
@@ -213,7 +213,7 @@ namespace odb
// It either has to be an exact match, or there should be
// a whitespace following the keyword.
//
- if (s.size () == n || s[n] == ' ' || s[n] =='\t')
+ if (s.size () == n || s[n] == ' ' || s[n] == '\n' || s[n] =='\t')
return true;
}
@@ -272,7 +272,7 @@ namespace odb
{
case clause_part::kind_column:
{
- if (last != ' ' && last != '(')
+ if (last != ' ' && last != '\n' && last != '(')
r += ' ';
r += i->part;
@@ -280,7 +280,7 @@ namespace odb
}
case clause_part::kind_param:
{
- if (last != ' ' && last != '(')
+ if (last != ' ' && last != '\n' && last != '(')
r += ' ';
// Add the conversion expression, if any.
@@ -307,8 +307,8 @@ namespace odb
const string& p (i->part);
char first (!p.empty () ? p[0] : ' ');
- if (last != ' ' && last != '(' &&
- first != ' ' && first != ',' && first != ')')
+ if (last != ' ' && first != '\n' && last != '(' &&
+ first != ' ' && last != '\n' && first != ',' && first != ')')
r += ' ';
r += p;
@@ -316,7 +316,7 @@ namespace odb
}
case clause_part::kind_bool:
{
- if (last != ' ' && last != '(')
+ if (last != ' ' && last != '\n' && last != '(')
r += ' ';
r += i->bool_part ? "1" : "0";