[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] DBI
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] DBI |
Date: |
Thu, 28 Feb 2008 16:30:21 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Feb 28, 2008 at 10:05:58AM -0500, Graham Fawcett wrote:
> > Why the thunk? (why not directly the port?)
>
> Laziness: it avoids the overhead of setting up the input port if it's
> not required. You might want to iterate over a set of (id, name, blob)
> records and only open the blob if the name meets some criteria that
> are local to the app (i.e. can't be expressed in a WHERE clause).
You can make a 'smart' custom port that only really opens the blob when
you first read from it (it has to be a custom port anyway, so this is
not too much extra work). This makes for a more convenient API, IMHO.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
pgpgTZtYQEAOm.pgp
Description: PGP signature
- Re: [Chicken-users] New immediate values (was: DBI), (continued)
- Re: [Chicken-users] DBI, Graham Fawcett, 2008/02/27
- Re: [Chicken-users] DBI, Vincent Manis, 2008/02/27
- Re: [Chicken-users] DBI, Peter Bex, 2008/02/28
- Re: [Chicken-users] DBI, Graham Fawcett, 2008/02/28
- Re: [Chicken-users] DBI, Peter Bex, 2008/02/28
- Re: [Chicken-users] DBI, Graham Fawcett, 2008/02/28
- Re: [Chicken-users] DBI,
Peter Bex <=
- Re: [Chicken-users] DBI, Graham Fawcett, 2008/02/28
- Re: [Chicken-users] DBI, Ozzi Lee, 2008/02/27
- Re: [Chicken-users] DBI, Alaric Snell-Pym, 2008/02/28
Re: [Chicken-users] DBI, Vincent Manis, 2008/02/27
Re: argument against using '() for null values? ([Chicken-users] DBI), Ozzi, 2008/02/27
Re: argument against using '() for null values? ([Chicken-users] DBI), Graham Fawcett, 2008/02/27
Re: argument against using '() for null values? ([Chicken-users] DBI), Ozzi, 2008/02/27