chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] DBI


From: Graham Fawcett
Subject: Re: [Chicken-users] DBI
Date: Wed, 27 Feb 2008 16:27:25 -0500

On Wed, Feb 27, 2008 at 4:04 PM, Peter Bex <address@hidden> wrote:
> On Wed, Feb 27, 2008 at 02:47:14PM -0600, Jeremy Sydik wrote:
>  > dbi:query-fold, dbi:query-map, query-for-each.  I thought about
>  > implementing these, but I
>  >       haven't been able to think of the use case that makes them necessary
>  > in the presence
>  >       Scheme's fold, map, and for-each, other than as shorthand (which
>  > could be define'd
>  >       in place in a heartbeat for anyone who wants it)
>
>  No.  If you want to look at a result set that consists of several hundred
>  binary blobs of megabytes each, you most certainly don't want to implement
>  this as a "fetch all into one list" operation.  You would want to load in
>  one row, handle it, then take the next, etc.

At the driver level, LOBs are often handled with a stream-based
interface. For an LOB, I'd suggest representing it with a a thunk
which, when evaluated, returns an input stream, Chicken blob or a
string. That would allow you to inspect the other column values before
deciding whether to evaluate the LOB.

G




reply via email to

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