DynGig::Util::EZDB - Interface to a single-schema SQLite DB
key TEXT NOT NULL, value TEXT, PRIMARY KEY ( key )
use DynGig::Util::EZDB; my $file = '/db/file/path'; my @table = qw( table1 table2 .. ); my $db = DynGig::Util::EZDB->new( $file, table => \@table ); my $db_existing = DynGig::Util::EZDB->new( $file ); $db->set( 'table1', 'key1', 'value1' ); my %keyval = $db->dump( 'table2' ); map { $db->delete( $_, key => 'key1', value => 'value2' ) } $db->table(); $db->truncate( 'table2' ); my $quoted = $db->quote( "bob loblaw's law blog" )
Set or get schema. In get mode, returns ARRAY ref in scalar context, returns ARRAY in list context.
INSERT or UPDATE keys and values into table. Returns status of operation.
Dump all records from a table into a HASH. Returns HASH reference in scalar context. Returns flattened HASH in list context.
Deletes by attribute from a table.
create a table
drop a table from the database
Deletes all records from a table.
See DBI::quote().
Returns a list of all tables. Returns ARRAY reference in scalar context.
reload table names form DB files.
Stat of database file. Also see stat(). Returns ARRAY reference in scalar context.
DBI
See DynGig::Util
To install DynGig::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DynGig::Util
CPAN shell
perl -MCPAN -e shell install DynGig::Util
For more information on module installation, please visit the detailed CPAN module installation guide.