4 use PSQL
::Query
::Token
::Row
::Operation
;
6 has
'rows_by_dom_depth' => (
10 , default => \
&build_rows_by_dom_depth
13 has
'rows_by_query_order' => (
16 , 'default' => sub { [] }
21 shift @
{$self->rows_by_query_order};
25 my ( $self, $row ) = @_;
26 unshift @
{$self->rows_by_query_order}, $row;
31 pop @
{$self->rows_by_query_order};
35 my ( $self, $row ) = @_;
36 push @
{$self->rows_by_query_order}, $row;
39 sub build_rows_by_dom_depth
{
44 foreach my $row (@
{ $self->rows_by_query_order }) {
46 my $dom_level = $row->dom_level;
47 my $name = $row->name;
49 push @
{ $rows->{ $dom_level }->{ $name } }, $row;
59 PSQL::Query - A framework to parse pg-query plans via the output of Explain / Explain Analyze
63 This module is currently a backend for L<psql-plus>, the release of .01 is largely dependant on it. The internals of this module are subject to change. Check the README for more information.
67 Evan Carroll, C<< <me at evancarroll.com> >>
69 =head1 COPYRIGHT & LICENSE
71 Copyright 2007 Evan Carroll, all rights reserved.
73 This program is free software; you can redistribute it and/or modify it
74 under the same terms as Perl itself.