DBD-Spanner
view release on metacpan or search on metacpan
t/26execute_array.t view on Meta::CPAN
use strict;
use warnings;
use Test::More tests => 3;
use DBI;
my $dbh = DBI->connect('dbi:Spanner:projects/p/instances/i/databases/d', '', '');
my $sth = $dbh->prepare('INSERT INTO users (id, val) VALUES (?, ?)');
my @col1 = (10, 20, 30);
my @col2 = ('a', 'b', 'c');
$sth->bind_param_array(1, \@col1);
$sth->bind_param_array(2, \@col2);
my $tuples = $sth->execute_array({ ArrayTupleStatus => [] });
is($tuples, 3, 'execute_array processed 3 tuples');
ok($sth, 'Statement handle active after batch execution');
ok($dbh->ping(), 'Connection alive after batch execution');
( run in 5.172 seconds using v1.01-cache-2.11-cpan-14f38c9f855 )