From 31fd2870497686667f20b2d43467a07482f8ab40 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 10 Sep 2013 14:10:45 +0200 Subject: Schema versioning support --- odb/sqlite/query.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'odb/sqlite/query.cxx') 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"; -- cgit v1.1