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.


In reply to Re^2: Save a statement handle to a file and open it again as a 'cursor' or something. by uber_spaced
in thread Save a statement handle to a file and open it again as a 'cursor' or something. by uber_spaced

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.