line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: DAO request - delete relationships |
2
|
|
|
|
|
|
|
package PONAPI::DAO::Request::DeleteRelationships; |
3
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
47
|
use Moose; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
69
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'PONAPI::DAO::Request'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'PONAPI::DAO::Request::Role::UpdateLike', |
9
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasDataBulk', |
10
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasDataMethods', |
11
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasID', |
12
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasRelationshipType'; |
13
|
|
|
|
|
|
|
|
14
|
14
|
|
|
14
|
0
|
96
|
sub check_data_type_match { 1 } # to avoid code duplications in HasDataMethods |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub execute { |
17
|
15
|
|
|
15
|
0
|
28
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
15
|
100
|
|
|
|
525
|
if ( $self->is_valid ) { |
20
|
9
|
|
|
|
|
305
|
my @ret = $self->repository->delete_relationships( %{ $self } ); |
|
9
|
|
|
|
|
72
|
|
21
|
|
|
|
|
|
|
|
22
|
6
|
50
|
|
|
|
80
|
$self->_add_success_meta(@ret) |
23
|
|
|
|
|
|
|
if $self->_verify_update_response(@ret); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
11
|
|
|
|
|
79
|
return $self->response(); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _validate_rel_type { |
30
|
14
|
|
|
14
|
|
30
|
my $self = shift; |
31
|
14
|
|
|
|
|
498
|
my $type = $self->type; |
32
|
14
|
|
|
|
|
748
|
my $rel_type = $self->rel_type; |
33
|
|
|
|
|
|
|
|
34
|
14
|
|
|
|
|
63
|
super(@_); |
35
|
|
|
|
|
|
|
|
36
|
14
|
100
|
|
|
|
586
|
if ( !$self->repository->has_one_to_many_relationship( $type, $rel_type ) ) { |
37
|
1
|
|
|
|
|
13
|
$self->_bad_request( "Types `$type` and `$rel_type` are one-to-one" ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
43
|
8
|
|
|
8
|
|
53962
|
no Moose; 1; |
|
8
|
|
|
|
|
22
|
|
|
8
|
|
|
|
|
43
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=pod |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=encoding UTF-8 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
PONAPI::DAO::Request::DeleteRelationships - DAO request - delete relationships |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 VERSION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
version 0.002006 |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHORS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=over 4 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item * |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Mickey Nasriachi <mickey@cpan.org> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item * |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Brian Fraser <hugmeir@cpan.org> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
82
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |