At 9:34 PM -0400 8/25/04, D. Richard Hipp wrote:
Parameters can be in any of three forms:
    *  <question-mark>
    *  <colon><identifier>
    *  <dollar-sign><tcl-variable-name>
Each parameter is assigned a number.  Numbers are sequential from left
to right and begin with 1.  The parameter number is used to bind values
to the parameter.  All parameters get a different number, even those
with identical names.
The sqlite3_bind_parameter_count() API returns the number of parameters
in a compiled SQL statement.  sqlite3_bind_parameter_name() returns the
text of a particular bound parameter.
This implementation is very simple and compact.  And with the exception
of not supporting <question-mark><number> parameters, the implementation
is sufficient, I believe to efficiently emulate all of the behaviors
described by Darren and Dennis.  Support for <question-mark><number>
can be added in the future if a genuine need appears.

That sounds great, Richard, thanks!

I suggest that this may be a good time to put out an official 3.0.5 release, which is still *beta* status, so more people can thorougly test the addition of :identifier and removal of [?NNN, :NNN:]. This is a *significant* change.

Matt Sergeant, when this happens, please release a corresponding DBD::SQLite 1.05, which provides proper pass-thru access for both the ? and :identifier binding methods. DBI itself declares ? in its standard interface, which each DBD either passes through to a natively supporting DB, or emulates; you probably used to emulate ? with SQLite2, but can do pass-thru with SQLite3. But if the newer DBI doesn't have a corresponding native API for :identifier, that takes a Perl hash ref as an argument, then please have passthru support for that via an extension in appropriate places, particularly having the $sth->execute() argument allowing a hash ref instead of a list. (In any event, I will petition for the standard DBI API to include :identifier support, if it doesn't already.)

Also, the SQLite core documentation at http://sqlite.org/capi3.html and other places will have to be updated to include the changes. It does not yet mention the bind_parameter_count/name() functions or :identifier, and does mention the old NNN formats.

Thank you very much to everyone for their hard work.

Good day. -- Darren Duncan

Reply via email to