D29277: Escape table name in when building a select statement with row id

jordi fita i mas noreply at phabricator.kde.org
Wed Apr 29 15:21:01 BST 2020


jfita created this revision.
jfita added reviewers: staniek, piggz.
Herald added a project: KDb.
Herald added a subscriber: Kexi-Devel-list.
jfita requested review of this revision.

REVISION 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

REPOSITORY
  R15 KDb

BRANCH
  3.2

REVISION DETAIL
  https://phabricator.kde.org/D29277

AFFECTED FILES
  src/KDbNativeStatementBuilder.cpp

To: jfita, staniek, piggz
Cc: Kexi-Devel-list, barman, wicik, staniek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kexi-devel/attachments/20200429/6e1111ab/attachment.html>


More information about the Kexi-devel mailing list