line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::Helper::ResultSet::NoColumns; |
2
|
|
|
|
|
|
|
$DBIx::Class::Helper::ResultSet::NoColumns::VERSION = '2.036000'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Look ma, no columns! |
4
|
|
|
|
|
|
|
|
5
|
56
|
|
|
56
|
|
26991
|
use strict; |
|
56
|
|
|
|
|
128
|
|
|
56
|
|
|
|
|
1488
|
|
6
|
56
|
|
|
56
|
|
274
|
use warnings; |
|
56
|
|
|
|
|
126
|
|
|
56
|
|
|
|
|
1409
|
|
7
|
|
|
|
|
|
|
|
8
|
56
|
|
|
56
|
|
269
|
use parent 'DBIx::Class::ResultSet'; |
|
56
|
|
|
|
|
131
|
|
|
56
|
|
|
|
|
295
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
1
|
68
|
sub no_columns { $_[0]->search(undef, { columns => [] }) } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
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) 2020 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 |