Helper/ResultSet/NoColumns.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Helper/ResultSet/CorrelateRelationship.pm ↑ Summary Helper/ResultSet/OneRow.pm »
1 package DBIx::Class::Helper::ResultSet::NoColumns;
2 54 $DBIx::Class::Helper::ResultSet::NoColumns::VERSION = '2.033001';
3 # ABSTRACT: Look ma, no columns!
4  
5 54 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 54 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 54 ▶use parent 'DBIx::Class::ResultSet';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶sub no_columns { $_[0]->search(undef, { columns => [] }) }
Subroutine no_columns: called CC=1 SCAR=0.0
Pod documented
11  
12 54 1;
13  
14 __END__
15  
16 =pod
17  
18 =head1 NAME
19  
20 DBIx::Class::Helper::ResultSet::NoColumns - Look ma, no columns!
21  
22 =head1 SYNOPSIS
23  
24 package MySchema::ResultSet::Bar;
25  
26 use strict;
27 use warnings;
28  
29 use parent 'DBIx::Class::ResultSet';
30  
31 __PACKAGE__->load_components('Helper::ResultSet::NoColumns');
32  
33 # in code using resultset:
34 my $rs = $schema->resultset('Bar')->no_columns->search(undef, {
35 '+columns' => { 'foo' => 'me.foo' },
36 });
37  
38 =head1 DESCRIPTION
39  
40 This component simply gives you a method to clear the set of columns to be
41 selected. It's just handy sugar.
42  
43 See L<DBIx::Class::Helper::ResultSet/NOTE> for a nice way to apply this to your
44 entire schema.
45  
46 =head1 METHODS
47  
48 =head2 no_columns
49  
50 $rs->no_columns
51  
52 Returns resultset with zero columns configured, fresh for the addition of new
53 columns.
54  
55 =head1 AUTHOR
56  
57 Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
58  
59 =head1 COPYRIGHT AND LICENSE
60  
61 This software is copyright (c) 2016 by Arthur Axel "fREW" Schmidt.
62  
63 This is free software; you can redistribute it and/or modify it under
64 the same terms as the Perl 5 programming language system itself.
65  
66 =cut
« Helper/ResultSet/CorrelateRelationship.pm ↑ Summary Helper/ResultSet/OneRow.pm »