line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Controller::DBIC::API::Types; |
2
|
|
|
|
|
|
|
$Catalyst::Controller::DBIC::API::Types::VERSION = '2.008001'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Provides shortcut types and coercions for DBIC::API |
4
|
16
|
|
|
16
|
|
128
|
use warnings; |
|
16
|
|
|
|
|
37
|
|
|
16
|
|
|
|
|
775
|
|
5
|
16
|
|
|
16
|
|
110
|
use strict; |
|
16
|
|
|
|
|
38
|
|
|
16
|
|
|
|
|
633
|
|
6
|
|
|
|
|
|
|
|
7
|
16
|
|
|
|
|
151
|
use MooseX::Types -declare => [ |
8
|
|
|
|
|
|
|
qw( OrderedBy GroupedBy Prefetch SelectColumns AsAliases ResultSource |
9
|
|
|
|
|
|
|
ResultSet Model SearchParameters JoinBuilder ) |
10
|
16
|
|
|
16
|
|
99
|
]; |
|
16
|
|
|
|
|
38
|
|
11
|
16
|
|
|
16
|
|
146339
|
use MooseX::Types::Moose(':all'); |
|
16
|
|
|
|
|
38
|
|
|
16
|
|
|
|
|
121
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
subtype Prefetch, as Maybe[ArrayRef[Str|HashRef]]; |
15
|
|
|
|
|
|
|
coerce Prefetch, from Str, via { [$_] }, from HashRef, via { [$_] }; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
subtype GroupedBy, as Maybe[ArrayRef[Str]]; |
19
|
|
|
|
|
|
|
coerce GroupedBy, from Str, via { [$_] }; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
subtype OrderedBy, as Maybe[ArrayRef[Str|HashRef|ScalarRef]]; |
23
|
|
|
|
|
|
|
coerce OrderedBy, from Str, via { [$_] }, from HashRef, via { [$_] }; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
subtype SelectColumns, as Maybe[ArrayRef[Str|HashRef]]; |
27
|
|
|
|
|
|
|
coerce SelectColumns, from Str, via { [$_] }, from HashRef, via { [$_] }; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
subtype SearchParameters, as Maybe[ArrayRef[HashRef]]; |
31
|
|
|
|
|
|
|
coerce SearchParameters, from HashRef, via { [$_] }; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
subtype AsAliases, as Maybe[ArrayRef[Str]]; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
subtype ResultSet, as class_type('DBIx::Class::ResultSet'); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
subtype ResultSource, as class_type('DBIx::Class::ResultSource'); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
subtype JoinBuilder, |
44
|
|
|
|
|
|
|
as class_type('Catalyst::Controller::DBIC::API::JoinBuilder'); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
subtype Model, as class_type('DBIx::Class'); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=pod |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Catalyst::Controller::DBIC::API::Types - Provides shortcut types and coercions for DBIC::API |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
version 2.008001 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 TYPES |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 Prefetch as Maybe[ArrayRef[Str|HashRef]] |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Represents the structure of the prefetch argument. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Coerces Str and HashRef. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 GroupedBy as Maybe[ArrayRef[Str]] |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Represents the structure of the grouped_by argument. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Coerces Str. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 OrderedBy as Maybe[ArrayRef[Str|HashRef|ScalarRef]] |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Represents the structure of the ordered_by argument |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Coerces Str. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 SelectColumns as Maybe[ArrayRef[Str|HashRef]] |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Represents the structure of the select argument |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Coerces Str. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 SearchParameters as Maybe[ArrayRef[HashRef]] |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Represents the structure of the search argument |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Coerces HashRef. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 AsAliases as Maybe[ArrayRef[Str]] |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Represents the structure of the as argument |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 ResultSet as class_type('DBIx::Class::ResultSet') |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Shortcut for DBIx::Class::ResultSet |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 ResultSource as class_type('DBIx::Class::ResultSource') |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Shortcut for DBIx::Class::ResultSource |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 JoinBuilder as class_type('Catalyst::Controller::DBIC::API::JoinBuilder') |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Shortcut for Catalyst::Controller::DBIC::API::JoinBuilder |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 Model as class_type('DBIx::Class') |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Shortcut for model objects |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 AUTHORS |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=over 4 |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item * |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Nicholas Perez <nperez@cpan.org> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Luke Saunders <luke.saunders@gmail.com> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item * |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Alexander Hartmaier <abraxxa@cpan.org> |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item * |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item * |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Oleg Kostyuk <cub.uanic@gmail.com> |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item * |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Samuel Kaufman <sam@socialflow.com> |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=back |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
This software is copyright (c) 2019 by Luke Saunders, Nicholas Perez, Alexander Hartmaier, et al. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
150
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=cut |