← Index
NYTProf Performance Profile   « line view »
For starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.log --error-log /var/log/koha/kohadev/plack-error.log -E deployment --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi
  Run on Fri Jan 8 14:31:06 2016
Reported on Fri Jan 8 14:33:30 2016

Filename/usr/share/perl5/DBIx/Class/Cursor.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11117µs24µsDBIx::Class::Cursor::::BEGIN@3DBIx::Class::Cursor::BEGIN@3
11111µs73µsDBIx::Class::Cursor::::BEGIN@6DBIx::Class::Cursor::BEGIN@6
11111µs15µsDBIx::Class::Cursor::::BEGIN@4DBIx::Class::Cursor::BEGIN@4
0000s0sDBIx::Class::Cursor::::allDBIx::Class::Cursor::all
0000s0sDBIx::Class::Cursor::::newDBIx::Class::Cursor::new
0000s0sDBIx::Class::Cursor::::nextDBIx::Class::Cursor::next
0000s0sDBIx::Class::Cursor::::resetDBIx::Class::Cursor::reset
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package DBIx::Class::Cursor;
2
3230µs
# spent 24µs (17+6) within DBIx::Class::Cursor::BEGIN@3 which was called: # once (17µs+6µs) by base::import at line 3
use strict;
# spent 24µs making 1 call to DBIx::Class::Cursor::BEGIN@3 # spent 6µs making 1 call to strict::import
4219µs
# spent 15µs (11+4) within DBIx::Class::Cursor::BEGIN@4 which was called: # once (11µs+4µs) by base::import at line 4
use warnings;
# spent 15µs making 1 call to DBIx::Class::Cursor::BEGIN@4 # spent 4µs making 1 call to warnings::import
5
6273µs
# spent 73µs (11+62) within DBIx::Class::Cursor::BEGIN@6 which was called: # once (11µs+62µs) by base::import at line 6
use base qw/DBIx::Class/;
# spent 73µs making 1 call to DBIx::Class::Cursor::BEGIN@6 # spent 62µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 62µs
7
8=head1 NAME
9
10DBIx::Class::Cursor - Abstract object representing a query cursor on a
11resultset.
12
13=head1 SYNOPSIS
14
15 my $cursor = $schema->resultset('CD')->cursor();
16
17 # raw values off the database handle in resultset columns/select order
18 my @next_cd_column_values = $cursor->next;
19
20 # list of all raw values as arrayrefs
21 my @all_cds_column_values = $cursor->all;
22
23=head1 DESCRIPTION
24
25A Cursor represents a query cursor on a L<DBIx::Class::ResultSet> object. It
26allows for traversing the result set with L</next>, retrieving all results with
27L</all> and resetting the cursor with L</reset>.
28
29Usually, you would use the cursor methods built into L<DBIx::Class::ResultSet>
30to traverse it. See L<DBIx::Class::ResultSet/next>,
31L<DBIx::Class::ResultSet/reset> and L<DBIx::Class::ResultSet/all> for more
32information.
33
34=head1 METHODS
35
36=head2 new
37
38Virtual method. Returns a new L<DBIx::Class::Cursor> object.
39
40=cut
41
42sub new {
43 die "Virtual method!";
44}
45
46=head2 next
47
48Virtual method. Advances the cursor to the next row. Returns an array of
49column values (the result of L<DBI/fetchrow_array> method).
50
51=cut
52
53sub next {
54 die "Virtual method!";
55}
56
57=head2 reset
58
59Virtual method. Resets the cursor to the beginning.
60
61=cut
62
63sub reset {
64 die "Virtual method!";
65}
66
67=head2 all
68
69Virtual method. Returns all rows in the L<DBIx::Class::ResultSet>.
70
71=cut
72
73sub all {
74 my ($self) = @_;
75 $self->reset;
76 my @all;
77 while (my @row = $self->next) {
78 push(@all, \@row);
79 }
80 $self->reset;
81 return @all;
82}
83
84=head1 FURTHER QUESTIONS?
85
86Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
87
88=head1 COPYRIGHT AND LICENSE
89
90This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
91by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
92redistribute it and/or modify it under the same terms as the
93L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
94
95=cut
96
971;