DBD::RAM 0.072 review
DownloadDBD::RAM is a DBI driver for files and data structures. SYNOPSIS use DBI; my $dbh = DBI->connect('DBI:RAM:','usr','pwd',{Rai
|
|
DBD::RAM is a DBI driver for files and data structures.
SYNOPSIS
use DBI;
my $dbh = DBI->connect('DBI:RAM:','usr','pwd',{RaiseError=>1});
$dbh->func({
table_name => 'my_phrases',
col_names => 'id,phrase',
data_type => 'PIPE',
data_source => [],
}, 'import' );
print $dbh->selectcol_arrayref(qq[
SELECT phrase FROM my_phrases WHERE id = 1
])->[0];
__END__
1 | Hello, New World
2 | Some other Phrase
This sample creates a database table from data, uses SQL to make a selection from the database and prints out the results. While this table is in-memory only and uses pipe "delimited" formating, many other options are available including local and remote file access and many different data formats.
DBD::RAM allows you to import almost any type of Perl data structure into an in-memory table and then use DBI and SQL to access and modify it. It also allows direct access to almost any kind of file, supporting SQL manipulation of the file without converting the file out of its native format.
The module allows you to prototype a database without having an rdbms system or other database engine and can operate either with or without creating or reading disk files. If you do use disk files, they may, in most cases, either be local files or any remote file accessible via HTTP or FTP.
Requirements:
Perl
DBD::RAM 0.072 keywords