Skip to content

Commit 3c43aa3

Browse files
authored
Merge pull request #132 from zauguin/fix-131
Allow whitespace after semicolons
2 parents 44b8355 + 2227a8f commit 3c43aa3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hdr/sqlite_modern_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace sqlite {
180180
const char *remaining;
181181
hresult = sqlite3_prepare_v2(_db.get(), sql.data(), -1, &tmp, &remaining);
182182
if(hresult != SQLITE_OK) errors::throw_sqlite_error(hresult, sql);
183-
if(!std::all_of(remaining, sql.data() + sql.size(), [](char ch) {return std::isblank(ch);}))
183+
if(!std::all_of(remaining, sql.data() + sql.size(), [](char ch) {return std::isspace(ch);}))
184184
throw errors::more_statements("Multiple semicolon separated statements are unsupported", sql);
185185
return tmp;
186186
}

tests/simple_examples.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int main()
1111
{
1212
database db(":memory:");
1313

14-
db << "CREATE TABLE foo (a integer, b string);";
14+
db << "CREATE TABLE foo (a integer, b string);\n";
1515
db << "INSERT INTO foo VALUES (?, ?)" << 1 << "hello";
1616
db << "INSERT INTO foo VALUES (?, ?)" << 2 << "world";
1717

0 commit comments

Comments
 (0)