chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] DBI


From: Alex Shinn
Subject: Re: [Chicken-users] DBI
Date: Sat, 01 Mar 2008 16:13:16 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

>>>>> "Tobia" == Tobia Conforto <address@hidden> writes:

    Tobia> What's wrong with the sql egg?  Can't we just use
    Tobia> that, maybe improve it a bit?

Sure, I didn't mean to rule that out.

The biggest issue I see with the sql egg right now is it
currently hard-codes all values, generating a new SQL
expression every time.  You want it to be able to represent
placeholder values (named or just with a ? as in Perl's DBI)
allowing the backends to cache the SQL expression and apply
it to different data.  However, different backends represent
this (and various other extensions we'll eventually want) in
different ways.  SQL could just generate a standard syntax
that all the backends would have to support, but then they'd
be reparsing the SQL string we just generated and then
putting it back together in their own way.  It makes more
sense to integrate the SQL generation with the backends from
the start.

The issue isn't just with the actual query string generated
either.  We may want the high-level interface to always
allow the LIMIT and OFFSET keywords to page results, even if
the backend doesn't support it, by emulating it on the
client side.  This would have to be handled as a combination
of query string generation and result set processing.

-- 
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]