Hmmm, how would you pass that function to execute.  I don't believe the dbi
interface allows that right now.  Maybe func() will have to do.  Unless you
can fake a bind var as an actual function reference.

Though I might be wrong.

Ilya

-----Original Message-----
From: Matt Sergeant
To: [EMAIL PROTECTED]
Sent: 2/18/02 7:02 AM
Subject: Mapping a "push" engine to DBI

DBI uses "pull" - you execute a statement then pull the results one by
one - exactly the same as a cursor in SQL terms.

But I'm working on a DBD driver [1] for a "push" engine - you pass a
callback function to execute() and it calls that for every row in the
result set.

Has anyone done a DBD driver for an API like that before that has some
pointers they could give me? I can certainly populate an array of all
the
results, but that's probably not exactly what I should be doing.

PS: If I forget to in the future, much kudos to Jonathan, Jochen and Tim
for the DBI::DBD docs - they sure made getting started simple, modulo a
few typos which I'll try and make note of for a patch later.

-- 
<!-- Matt -->
<:->Get a smart net</:->

[1] It's DBD::SQLite for anyone interested, based on the SQLite engine
at
http://www.hwaci.com/sw/sqlite/ - the intention is to be a replacement
for
DBD::CSV where people need more power and speed - good for demos and
things like that.

Reply via email to