[DB-SIG] API suggestion: expose 'quote' method
Chris Cogdon
chris at cogdon.org
Wed Jun 4 18:18:57 EDT 2003
On Wednesday, Jun 4, 2003, at 03:10 US/Pacific, Magnus Lyckå wrote:
> At 20:20 2003-06-03 -0700, Chris Cogdon wrote:
>> Clue me in here. What's Dynamic SQL, CLI, and Embedded SQL ?
>
> Phew... I'm not so good at short explanations. :)
[explaination omitted]
Okay, will need a few re-reads to digest that. If it's okay with you,
I'll post any questions directly, and send a summary/paraphrase back to
the list.
>> I've cited examples before, but... if they're not clear enough, I
>> think I'd need to cite a complete working model. Can we take it as
>> read that there may be SOME applications where this ability would be
>> useful ?
>
> Do you mean that the SQL would run faster in the database,
> or do you mean that it would be faster for you to code the
> SQL? I don't doubt that the latter can be true.
Definitely the latter. However, I've ALREADY written a small module
that lets you piecemeal a SQL statement together, but keeping the
parameters separate. I'll flesh it out to cover all the little side
cases and post a link to it when it's done. Ie, it wasn't THAT hard,
and not that messy to use, either.
But, I have an older application that needs to 'store' the query used
to get the information presented. And, in that case, it is still useful
to be able to store the SQL directly. (Again, I could probably make my
own workaround, but just being able to string-store the WHERE clause is
a LOT easier)
So, perhaps what I really should be asking for is to include a
specification for an interface, such as what I've suggested before, but
make that a OPTIONAL part of the specification. Ie, if it's easy enough
to expose, then the driver writers should expose it in the standard
form.
Does THAT sound reasonable ?
--
("`-/")_.-'"``-._ Chris Cogdon <chris at cogdon.org>
. . `; -._ )-;-,_`)
(v_,)' _ )`-.\ ``-'
_.- _..-_/ / ((.'
((,.-' ((,/ fL
More information about the DB-SIG
mailing list