diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-10 17:25:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-10 17:25:20 +0200 |
commit | 0d099d1930b1870db7f20761388b9772d0abfedc (patch) | |
tree | 09b9a515cacc4eef70387f3585aac1ca099bb5c1 | |
parent | 399d2ddf0d5b124e189b4d37dd61f5788acfa2c5 (diff) |
Add PRAGMA to list of complete query prefixes
'PRAGMA integrity_check' is like SELECT.
-rw-r--r-- | odb/sqlite/query.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/odb/sqlite/query.cxx b/odb/sqlite/query.cxx index 6e475d8..31d81be 100644 --- a/odb/sqlite/query.cxx +++ b/odb/sqlite/query.cxx @@ -199,18 +199,20 @@ namespace odb // rather than getting involved with the portable case- // insensitive string comparison mess. // - if (s.compare (0, (n = 5), "WHERE") == 0 || - s.compare (0, (n = 5), "where") == 0 || - s.compare (0, (n = 6), "SELECT") == 0 || - s.compare (0, (n = 6), "select") == 0 || + if (s.compare (0, (n = 5), "WHERE") == 0 || + s.compare (0, (n = 5), "where") == 0 || + s.compare (0, (n = 6), "SELECT") == 0 || + s.compare (0, (n = 6), "select") == 0 || s.compare (0, (n = 8), "ORDER BY") == 0 || s.compare (0, (n = 8), "order by") == 0 || s.compare (0, (n = 8), "GROUP BY") == 0 || s.compare (0, (n = 8), "group by") == 0 || - s.compare (0, (n = 6), "HAVING") == 0 || - s.compare (0, (n = 6), "having") == 0 || - s.compare (0, (n = 4), "WITH") == 0 || - s.compare (0, (n = 4), "with") == 0) + s.compare (0, (n = 6), "HAVING") == 0 || + s.compare (0, (n = 6), "having") == 0 || + s.compare (0, (n = 4), "WITH") == 0 || + s.compare (0, (n = 4), "with") == 0 || + s.compare (0, (n = 6), "PRAGMA") == 0 || + s.compare (0, (n = 6), "pragma") == 0) { // It either has to be an exact match, or there should be // a whitespace following the keyword. |