| 1 | package Mojo::InfluxDB::Row; | ||||||||||
| 2 | # ABSTRACT: Result row container | ||||||||||
| 3 | 1 | $Mojo::InfluxDB::Row::VERSION = '0.1'; | |||||||||
| 4 | 1 | ▶ | use Mojo::Base -base, -signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Mojo::InfluxDB::Point; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Mojo::Collection qw/ c /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use List::MoreUtils qw/ zip /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | has 'time_zone'; | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | has src => sub { die "This result is empty" }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 12 | |||||||||||
| 13 | 1 | for my $field (qw/ names tags columns values partial /) { | |||||||||
| 14 | 0 | ▶ | has $field => sub($self){ $self->src->{$field} }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | has points => sub($self) { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=4.1
| |||||||||||
| 18 | 0 | ▶ | c( $self->values->@* )->map(sub { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 19 | 0 | ▶ | Mojo::InfluxDB::Point->inflate(+{ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | zip( $self->columns->@*, $_->@* ), | ||||||||||
| 21 | ( $self->tags ? $self->tags->%* : () ) | ||||||||||
| 22 | }); | ||||||||||
| 23 | }) | ||||||||||
| 24 | 0 | }; | |||||||||
| 25 | |||||||||||
| 26 | 1 | 1; | |||||||||
| 27 | |||||||||||
| 28 | __END__ | ||||||||||