Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: DBD::SQLite questions

by techman2006 (Beadle)
on Nov 27, 2013 at 17:56 UTC ( [id://1064674] : note . print w/replies, xml ) Need Help??


in reply to Re: DBD::SQLite questions
in thread DBD::SQLite questions

One thing a SQLite is a flat files based DB so you can compress the files using either gzip or other compression you like.

Replies are listed 'Best First'.
Re^3: DBD::SQLite questions
by elef (Friar) on Nov 28, 2013 at 08:34 UTC
    Well, SQLite has internal hooks for compress() and uncompress() so I would like to use those. I just don't know how.
    From the documentation, it seems I would need to call
    $dbh->sqlite_create_function( 'compress', 1, sub { # magic incantation +s for compression } ); $dbh->sqlite_create_function( 'uncompress', 1, sub { # magic incantati +ons for uncompression } );


    Then when I call INSERT or SELECT I need to compress() and uncompress() the text strings.
    Maybe I could use IO::Compress::Zip for the magic incantations...?
    That's what I can gather, but I can find no specifics on implementation.