Escape table name in when building a select statement with row id
Summary:
When a KDbQuerySchema has a table name or alias that is a reserved SQL
keyword, and the alsoRetrieveRecordId statement option is set to true,
KDbNativeStatementBuilder constructed an incorrect statement.
For instance, if trying to create a SELECT statement in SQLite of a
table named “table” with a single “id column, the generated query was:
SELECT [id], table.OID FROM [table] ORDER BY [id]
The execution if that query generated an error due to the unescaped
table keyword. With this commit, the generated query is:
SELECT [id], [table].OID FROM [table] ORDER BY [id]
FIXED-IN:3.2.1
Reviewers: staniek, piggz
Reviewed By: staniek
Subscribers: Kexi-Devel-list
Tags: KDb
Differential Revision: https://phabricator.kde.org/D29277