| 1 | # Copyright (C) 2021-2022 Horimoto Yasuhiro <horimoto@clear-code.com> | ||||||||||
| 2 | # | ||||||||||
| 3 | # This program is free software: you can redistribute it and/or modify | ||||||||||
| 4 | # it under the terms of the GNU General Public License as published by | ||||||||||
| 5 | # the Free Software Foundation, either version 3 of the License, or | ||||||||||
| 6 | # (at your option) any later version. | ||||||||||
| 7 | # | ||||||||||
| 8 | # This program is distributed in the hope that it will be useful, | ||||||||||
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||
| 11 | # GNU General Public License for more details. | ||||||||||
| 12 | # | ||||||||||
| 13 | # You should have received a copy of the GNU General Public License | ||||||||||
| 14 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||||||||
| 15 | |||||||||||
| 16 | package Groonga::ResultSet; | ||||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | use JSON::PP; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | |||||||||||
| 23 | 1 | my $command_response_code = undef; | |||||||||
| 24 | 1 | my @command_response_raw = (); | |||||||||
| 25 | 1 | my $command_response = {}; | |||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 28 | 0 | my ($class, %args) = @_; | |||||||||
| 29 | 0 | my $self = {%args}; | |||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | if ($self->{decoded_content}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | @command_response_raw = decode_json($self->{decoded_content}); | |||||||||
| 33 | 0 | $command_response_code = $command_response_raw[0][0][0]; | |||||||||
| 34 | 0 | $command_response = $command_response_raw[0][1]; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 0 | return bless $self, $class; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | sub is_success { | ||||||||
|
Subroutine
is_success: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 41 | 0 | return $command_response_code == 0; | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub content { | ||||||||
|
Subroutine
content: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 45 | 0 | return $command_response; | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 1 | 1; | |||||||||