in reply to Re: Save a statement handle to a file and open it again as a 'cursor' or something.
in thread Save a statement handle to a file and open it again as a 'cursor' or something.
DBD::Anydata appears to be for interacting with specified types of files as databases. SthFile just saves a statement handle as a cursor that can be opened at a later time.
DBD::CSV changes NULL values to empty strings. SthFile saves the actual array returned from the statement handle. NULL values are undefs.
DBD::RAM (from the documentation) pulls the entire data structure into memory. SthFile streams it.
DBD::Mock just makes the a database handle that 'looks like' it worked.
DBD::Sponge makes a handle out of perl data that is already in memory. SthFile's streams data into memory.
DBD::Sprite appears to require you to create a table with definitions before saving stuff to the file. SthFile just streams a statement handle to disk, and then reads it from disk.
A future modification will probably involve allowing an open handle of any type to be the output or input of SthFile.
I already know something like this would be useful to me. One of the things I'm wondering is if I should make it as an extension for other dbd drivers that automatically save a statement handles meta data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Save a statement handle to a file and open it again as a 'cursor' or something.
by mr_mischief (Monsignor) on Aug 23, 2007 at 19:23 UTC | |
by uber_spaced (Novice) on Aug 23, 2007 at 20:40 UTC | |
by f00li5h (Chaplain) on Aug 24, 2007 at 06:43 UTC |