D29346: Quote and parse identifiers with square brackets

jordi fita i mas noreply at phabricator.kde.org
Fri May 1 20:26:30 BST 2020


jfita added a comment.


  Beware that the SQL query in the summary will not work with the change in D29277 <https://phabricator.kde.org/D29277> and it will fail with
  
    Error opening database cursor.
    Message from server: near "table": syntax error
    Server result code: 1 (SQLITE_ERROR)
  
  The following modified query avoids the need for escaping in the SQLite driver and works with the change in this diff:
  
    SELECT id AS [integer], [another parameter] FROM sample WHERE id > [parameter] ORDER BY [integer] desc;
  
  Is not as interesting as the other, though :).
  
  Also note that the changes would have been far less extensive if the characters for query parameters and quoted identifiers were not the same.
  I guess you already considered that, but i felt like i should mention it anyway.

REPOSITORY
  R15 KDb

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

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/20200501/762981d3/attachment-0001.html>


More information about the Kexi-devel mailing list