https://bugs.documentfoundation.org/show_bug.cgi?id=104986

--- Comment #18 from Lionel Elie Mamane <lio...@mamane.lu> ---
(In reply to Lionel Elie Mamane from comment #17)
> connectivity::firebird::Connection::transformPreparedStatement
> seems to exist only to remove named parameters... Which can be
> done much more cleanly by setting (hardcoding) the appropriate setting.
> <sigh>

Actually, that last part is wrong. The setting is acted upon by the general
LibreOffice layer, it is just passed down to the driver, and the driver has to
implement the removal of named parameters itself. It seems only the ODBC and
the JDBC drivers currently do (althought he MySQL driver seems to know about
it), and they, like the current Firebird driver, do it by using the LibreOffice
SQL parser to parse the statement, use
connectivity::OSQLParseNode::substituteParameterNames to replace named
parameters by unnamed ones, and then convert the SQL statement back to string.

There is probably a much more robust way to do it... One only has to grossly
lex the SQL, just keeping track of whether on is inside a '-delimited string or
a "-delimited identifier. And outside of that, replace any word that starts
with ":" with "?".

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to