Mojo::InfluxDB::Point - Data point dynamic container
version 0.1
You won't usually deal with this objects, but get it from InfluxDB::Row or InfluxDB::Result points() methods.
Anyway, given the dynamical nature of this object, if you need to manually contruct one, you need to use the inflate() method:
use Mojo::InfluxDB::Point; my $point = Mojo::InfluxDB::Point->inflate({ time => '2020-09-19T07:00:00Z', # required! tags => [qw/ one two seven /], status => "SECONDARY" });
This class is a dynamic container of data points coming from InfluxDB::Row. It only requires to have a time and will dinamically create object attributes for the rest of the retrieved columns.
this is the string as it comes from InfluxDB and is the only required one.
an optional time zone. See at().
A DateTime object representing the time() on the optionally given time_zone().
Fields will be filled by inflate() at build time and will contain an array of dynamically added attributes.
this is the constructor for this class. Internally it will call new(). This class method handles the "magic" of dinamically detecting fields and adding an attribute for those.
Gonzalo Radio <gonzalo@gnzl.net>
This software is copyright (c) 2020 by Gonzalo Radio.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Mojo::InfluxDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::InfluxDB
CPAN shell
perl -MCPAN -e shell install Mojo::InfluxDB
For more information on module installation, please visit the detailed CPAN module installation guide.