| 1 | package Catalyst::Controller::DBIC::API::Types; | ||
| 2 | 16 | $Catalyst::Controller::DBIC::API::Types::VERSION = '2.009000'; | |
| 3 | #ABSTRACT: Provides shortcut types and coercions for DBIC::API | ||
| 4 | 16 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 16 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 16 | ▶ | use MooseX::Types -declare => [ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | qw( OrderedBy GroupedBy Prefetch SelectColumns AsAliases ResultSource | ||
| 9 | ResultSet Model SearchParameters JoinBuilder ) | ||
| 10 | 16 | ]; | |
| 11 | 16 | ▶ | use MooseX::Types::Moose(':all'); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | |||
| 14 | 16 | subtype Prefetch, as Maybe[ArrayRef[Str|HashRef]]; | |
| 15 | 3 | ▶ | coerce Prefetch, from Str, via { [$_] }, from HashRef, via { [$_] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | |||
| 18 | 16 | subtype GroupedBy, as Maybe[ArrayRef[Str]]; | |
| 19 | 1 | ▶ | coerce GroupedBy, from Str, via { [$_] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | |||
| 22 | 16 | subtype OrderedBy, as Maybe[ArrayRef[Str|HashRef|ScalarRef]]; | |
| 23 | 0 | ▶ | coerce OrderedBy, from Str, via { [$_] }, from HashRef, via { [$_] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.4
Subroutine
__ANON__: not called CC=1 SCAR=0.4
| |||
| 24 | |||
| 25 | |||
| 26 | 16 | subtype SelectColumns, as Maybe[ArrayRef[Str|HashRef]]; | |
| 27 | 0 | ▶ | coerce SelectColumns, from Str, via { [$_] }, from HashRef, via { [$_] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.4
Subroutine
__ANON__: not called CC=1 SCAR=0.4
| |||
| 28 | |||
| 29 | |||
| 30 | 16 | subtype SearchParameters, as Maybe[ArrayRef[HashRef]]; | |
| 31 | 35 | ▶ | coerce SearchParameters, from HashRef, via { [$_] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 32 | |||
| 33 | |||
| 34 | 16 | subtype AsAliases, as Maybe[ArrayRef[Str]]; | |
| 35 | |||
| 36 | |||
| 37 | 16 | subtype ResultSet, as class_type('DBIx::Class::ResultSet'); | |
| 38 | |||
| 39 | |||
| 40 | 16 | subtype ResultSource, as class_type('DBIx::Class::ResultSource'); | |
| 41 | |||
| 42 | |||
| 43 | 16 | subtype JoinBuilder, | |
| 44 | as class_type('Catalyst::Controller::DBIC::API::JoinBuilder'); | ||
| 45 | |||
| 46 | |||
| 47 | 16 | subtype Model, as class_type('DBIx::Class'); | |
| 48 | |||
| 49 | 16 | 1; | |
| 50 | |||
| 51 | __END__ | ||