DBIx::Roles::Buffered - buffer write-only queries.
Saves do() and selectrow_array() in a buffer, calls these as a single query later. Useful with lots of UPDATES and INSERTS over connections with high latency.
use DBIx::Roles qw(Buffered); my $dbh = DBI-> connect( "dbi:Pg:dbname=template1", "postgres", "password", { Buffered => 1, BufferSize => 2048 }, ); $dbh-> do('INSERT INTO moo VALUES(?)', {}, 1); $dbh-> do('INSERT INTO moo VALUES(?)', {}, 1); $dbh-> do('INSERT INTO moo VALUES(?)', {}, 1); $dbh-> flush;
Boolean flag, does buffering only if 1 ; is 1 by default. When set to 0, flushes the buffer.
Tries to preserve buffer so that maximal query ( the SQL query, after the expansion ) is no longer than $BYTES.
Flushes the buffer; discards the buffer content if $DISCARD is 1.
DBI, DBIx::Roles.
Copyright (c) 2005 catpipe Systems ApS. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Dmitry Karasik <dk@catpipe.net>
To install DBIx::Roles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Roles
CPAN shell
perl -MCPAN -e shell install DBIx::Roles
For more information on module installation, please visit the detailed CPAN module installation guide.