Class::ReluctantORM::Monitor::JoinCount - Track JOINs in queries
use aliased 'Class::ReluctantORM::Monitor::JoinCount'; my $mon = JoinCounter->new(highwater_count => N, fatal_threshold => X); Class::ReluctantORM->install_global_monitor($mon); Pirate->install_class_monitor($mon); # Do a query.... logging and highwater scorekeeping happens Pirate->fetch(...); # Read from the monitor my $count = $mon->last_measured_value();
Tracks the number of JOINs in the FROM clause in the last query that was attempted to be executed.
Note that number of joins does not match number of relationships in the 'with' clause. Some relationship, such as HasLazy, contribute 0 JOINs, while others contribute more than one (HasManyMany).
This is a Measuring Monitor.
To install Class::ReluctantORM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::ReluctantORM
CPAN shell
perl -MCPAN -e shell install Class::ReluctantORM
For more information on module installation, please visit the detailed CPAN module installation guide.