Net::Drizzle - perl bindings for libdrizzle
use Net::Drizzle; my $dr = Net::Drizzle->new(); my $con = $dr->con_create(); $con->set_tcp('localhost', 10010); $con->add_options(Net::Drizzle::DRIZZLE_CON_MYSQL); $con->set_db("information_schema"); $dr->escape(q{"}); my $s1 = $con->query_add('select * from foo;'); $dr->query_run_all(); if ($s1->error_code != 0) { die "@{[ $s1->error_code ]}: @{[ $s1->error ]}"; } while (my $row = $s1->row_next) { my @row = @$row; printf "$i: $row[0], $row[1]"; }
Net::Drizzle is perl bindings for libdrizzle. Net::Drizzle has a straightforward interface for libdrizzle. If you want a DBI like interface, please use DBD::Drizzle instead.
libdrizzle can connect to mysql server and drizzle server. You can use libdrizzle as better version of libmysqlclient.
libdrizzle's great features are listed below.
THIS MODULE IS IN ITS BETA QUALITY. API MAY CHANGE IN THE FUTURE
Net::Drizzle can handle the concurrent queries.The example code is in the synopsis.
Net::Drizzle can use with any event driven frameworks such as POE, Danga::Socket, etc.
This library provides server protocol interface. You can use it to write proxies or "fake" drizzle and mysql servers.
create new instance of Net::Drizzle.
create new connection object.
create new connection object for a lot of informations.
run all queries concurrently.
quote meta chars.
This method is same as unpack('H*', $str).
get the version of libdrizzle
add options.
Wait for I/O on connections.
Return an error string for last library error encountered.
Return an error code for last library error encountered.
Run queries concurrently, returning when one is complete.
This is a simple benchmark result of Net::Drizzle(by benchmark/simple.pl).
Net::Drizzle: 0.01 DBD::mysql: 4.007 DBI: 1.608 Rate dbd_mysql serial concurrent dbd_mysql 65.6/s -- -48% -53% serial 126/s 92% -- -11% concurrent 141/s 115% 12% --
Tokuhiro Matsuno <tokuhirom @*(#RJKLFHFSDLJF gmail.com>
kazuhooku(many advice and suggested to write this module)
gfx++(xs)
DBD::Drizzle
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Drizzle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Drizzle
CPAN shell
perl -MCPAN -e shell install Net::Drizzle
For more information on module installation, please visit the detailed CPAN module installation guide.