| 1 | package Geoffrey::Action::Constraint::Index; | ||||||||||
| 2 | |||||||||||
| 3 | 7 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | ▶ | use 5.016; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 7 | ▶ | use parent 'Geoffrey::Role::Action'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 7 | $Geoffrey::Action::Constraint::Index::VERSION = '0.000206'; | |||||||||
| 11 | |||||||||||
| 12 | 9 | ▶ | sub add { | ||||||||
|
Subroutine
add: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 13 | 9 | my ( $self, $hr_params ) = @_; | |||||||||
| 14 | 9 | return $self->do( $self->converter->index->add($hr_params) ); | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 3 | ▶ | sub alter { | ||||||||
|
Subroutine
alter: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 18 | 3 | my ( $self, $hr_params ) = @_; | |||||||||
| 19 | 3 | return [ $self->drop($hr_params), $self->add($hr_params) ]; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 7 | ▶ | sub drop { | ||||||||
|
Subroutine
drop: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 23 | 7 | my ( $self, $hr_params ) = @_; | |||||||||
| 24 | 7 | require Ref::Util; | |||||||||
| 25 | 7 | ▶ | my $s_name = Ref::Util::is_hashref($hr_params) ? $hr_params->{name} : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 7 | ▶ | if ( !$s_name ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 1 | require Geoffrey::Exception::RequiredValue; | |||||||||
| 28 | 1 | Geoffrey::Exception::RequiredValue::throw_index_name('to drop'); | |||||||||
| 29 | } | ||||||||||
| 30 | 6 | return $self->do( $self->converter->index->drop($s_name) ); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 4 | ▶ | sub list_from_schema { | ||||||||
|
Subroutine
list_from_schema: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 34 | 4 | my ( $self, $schema ) = @_; | |||||||||
| 35 | 4 | my $converter = $self->converter; | |||||||||
| 36 | 4 | return $converter->index_information( $self->do_arrayref( $converter->index->list($schema) ) ); | |||||||||
| 37 | |||||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 7 | 1; | |||||||||
| 41 | |||||||||||
| 42 | __END__ | ||||||||||