grammar: Fix double quote characters as used for escaping one

SQL allows you to use two quote characters instead of just one in order
to escape them. Example: ['aa''bb'] is read as [aa'bb]. Add detection
for these doubled quote characters to our grammar parser.

See issue #128.
This commit is contained in:
Martin Kleusberg
2014-10-15 19:29:19 +02:00
parent a0f22a1ddb
commit 19baeb2a7a
3 changed files with 15 additions and 7 deletions

View File

@@ -221,7 +221,7 @@ void TestTable::parseSQLEscapedQuotes()
QCOMPARE(tab.name(), QString("double_quotes"));
QCOMPARE(tab.fields().at(0)->name(), QString("a"));
QCOMPARE(tab.fields().at(0)->defaultValue(), QString("a''a"));
QCOMPARE(tab.fields().at(0)->defaultValue(), QString("'a''a'"));
}
void TestTable::createTableWithIn()