1Data::Stream::Bulk::DBIU(s3e)r Contributed Perl DocumentaDtaitoan::Stream::Bulk::DBI(3)
2
3
4
6 Data::Stream::Bulk::DBI - N-at-a-time iteration of DBI statement
7 results.
8
10 version 0.11
11
13 use Data::Stream::Bulk::DBI;
14
15 my $sth = $dbh->prepare("SELECT hate FROM sql"); # very big resultset
16 $sth->execute;
17
18 return Data::Stream::Bulk::DBI->new(
19 sth => $sth,
20 max_rows => $n, # how many at a time
21 slice => [ ... ], # if you want to pass the first param to fetchall_arrayref
22 );
23
25 This implementation of Data::Stream::Bulk api works with DBI statement
26 handles, using "fetchall_arrayref" in DBI.
27
28 It fetches "max_rows" at a time (defaults to 500).
29
31 sth The statement handle to call "fetchall_arrayref" on.
32
33 slice
34 Passed verbatim as the first param to "fetchall_arrayref". Should
35 usually be "undef", provided for completetness.
36
37 max_rows
38 The second param to "fetchall_arrayref". Controls the size of each
39 buffer.
40
41 Defaults to 500.
42
44 get_more
45 See Data::Stream::Bulk::DoneFlag.
46
47 Calls "fetchall_arrayref" to get the next chunk of rows.
48
49 all Calls "fetchall_arrayref" to get the raminder of the data (without
50 specifying "max_rows").
51
53 Yuval Kogman <nothingmuch@woobling.org>
54
56 This software is copyright (c) 2012 by Yuval Kogman.
57
58 This is free software; you can redistribute it and/or modify it under
59 the same terms as the Perl 5 programming language system itself.
60
61
62
63perl v5.28.1 2012-02-14 Data::Stream::Bulk::DBI(3)