On 2016-01-07 4:55 PM, Warren Young wrote: > 2. There is no ?preview? mechanism. That is, you can?t bind some parameters > to a prepared query string and then get the resulting SQL because SQLite > substitutes the values into the query at a layer below the SQL parser. This > means that if you have an error in your SQL syntax or your parameters cause a > constraint violation, your debug logging layer can only log the prepared > query string, not the parameters that went into it, which makes it > unnecessarily difficult to determine which code path caused you to get the > error when looking at logs of a running system.
The current method of binding is correct. All we really need is that the debug logging layer include both the SQL of the prepared statement AND a list of the bound values when the execute failed, and optionally a stack trace. As for problems due to syntax errors, those presumably would be caught at prepare time or have nothing to do with the execute time values anyway as syntax errors are by definition a SQL syntax problem. -- Darren Duncan