Hash::Storage::Driver::DBI - DBI driver for Hash::Storage
MODULE IS IN A DEVELOPMENT STAGE. DO NOT USE IT YET.
my $st = Hash::Storage->new( driver => [ DBI => { dbh => $dbh, serializer => 'JSON', table => 'users', key_column => 'user_id', data_column => 'serialized', index_columns => ['age', 'fname', 'lname', 'gender'] }]); # Store hash by id $st->set( 'user1' => { fname => 'Viktor', gender => 'M', age => '28' } ); # Get hash by id my $user_data = $st->get('user1'); # Delete hash by id $st->del('user1');
Hash::Storage::Driver::DBI is a DBI Driver for Hash::Storage (multipurpose storage for hash). You can consider Hash::Storage object as a collection of hashes. You can use it for storing users, sessions and a lot more data.
Database handler
Data::Serializer driver name
Table name to save data
column for saving object id
all data will be serialized in one field.
List of colums to increase searches
"koorchik", <"koorchik at cpan.org">
<"koorchik at cpan.org">
Please report any bugs or feature requests to https://github.com/koorchik/Hash-Storage-Driver-DBI/issues
Copyright 2012 "koorchik".
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Hash::Storage::Driver::DBI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hash::Storage::Driver::DBI
CPAN shell
perl -MCPAN -e shell install Hash::Storage::Driver::DBI
For more information on module installation, please visit the detailed CPAN module installation guide.