On Sun, 10 Mar 2002, Jonathan Leffler wrote:

> > > > Binding is simplified: simply scan for the desired placeholder name and
> > > > copy the value and data type.  Execution is simplified because we need
> > > > not reparse the statement.  The bound values need to be quoted and
> > > > escaped, then all the parts of the statement copied into the output
> > > > buffer and forwarded to the database library.
> > > >
> > > > It sounds prety good to me, but I'd like to hear what other DBD
> > > > maintainers think about this plan.
> > >
> > > Is there some reason that each individual DBD maintainer needs to
> > > write this kind of code? To my naive ears it sounds like something
> > > that's generally useful. Yes, different backends support different
> > > placeholder syntax, but that ought to be something that can be made
> > > generic and configurable in the parser, shouldn't it?

Hrm, any reason why this cannot (or should not?) be done with yacc? 

Give each driver its own .y grammar file, however keep the tags consistent 
across all grammars (START_COMMENT/END_COMMENT, NUMERIC_PLACEHOLDER, etc).

-alex

Reply via email to