NAME

CPAN::Testers::Schema::ResultSet::Stats - Query the raw test reports

VERSION

version 0.027

SYNOPSIS

my $rs = $schema->resultset( 'Stats' );
$rs->insert_test_report( $schema->resultset( 'TestReport' )->first );

DESCRIPTION

This object helps to insert and query the legacy test reports (cpanstats).

METHODS

since

my $rs = $rs->since( $iso_dt );

Restrict the resultset to reports submitted since the given date/time (in ISO8601 format).

perl_maturity

$rs = $rs->perl_maturity( 'stable' ) # or 'dev'

Restrict the resultset to reports submitted for either stable or dev Perl versions.

insert_test_report

my $stat = $rs->insert_test_report( $report );

Convert a CPAN::Testers::Schema::Result::TestReport object to the new test report structure and insert it into the database. This is for creating backwards-compatible APIs.

Returns an instance of CPAN::Testers::Schema::Result::Stats on success. Note that since an uploadid is required for the cpanstats table, this method throws an exception when an upload cannot be determined from the given information.

SEE ALSO

CPAN::Testers::Schema::Result::Stats, DBIx::Class::ResultSet, CPAN::Testers::Schema

AUTHORS

  • Oriol Soriano <oriolsoriano@gmail.com>

  • Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Oriol Soriano, Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.