Some general points (I've not read the thread in any detail)...

The only things named placeholders give you are:

 1. The ability to bind one value into multiple placeholders with
    one method call by using the same placeholder name in
    multiple places in a statement.

 2. More readable SQL statements by using meaningful placeholder names.

Named placeholders could only really be an alternative way to bind
values to 'normal' placeholders. They can't do anything, in relation
to the server's interpretation of the SQL statement, that normal
placeholders can't do, so don't go there.

Given the above, all that's needed are mechanisms to:

 a. Translate named placeholders back to normal placeholders
    (for databases that don't support named placeholders)
    and record the sequence numbers of the normal placeholders
    associated with each named placeholder.

 b. When binding a named placeholder change that into binding
    the value to the corresponding set of index numbers.

Google for my previous posts about a preparse() method for my
thinking on handling client-side parsing for placeholders and
SQL translations. (This work hasn't got very far and if it doesn't
soon I'll be asking for volunteers with Parse::RecDescent experience
to step forward.)

For the binding I really don't want to add new methods, so the
driver would need to be changed to recognise a bind_param to a named
placeholder and get the corresponding set of placeholder index
values to use.

Now a question to all: which database servers, other than Oracle,
support named placeholders and what syntax do they use?

Tim.

Reply via email to