|
static | measurement ($name) |
|
static | fromArray ($data) |
|
|
const | DEFAULT_WRITE_PRECISION = WritePrecision::NS |
|
◆ __construct()
InfluxDB2\Point::__construct |
( |
| $name, |
|
|
| $tags = null, |
|
|
| $fields = null, |
|
|
| $time = null, |
|
|
| $precision = Point::DEFAULT_WRITE_PRECISION ) |
Create DataPoint instance for specified measurement name.
- Parameters
-
[String] | name the measurement name for the point. |
[Array] | tags the tag set for the point |
[Array] | fields the fields for the point |
[Integer] | time the timestamp for the point |
[WritePrecision] | precision the precision for the unix timestamps within the body line-protocol |
◆ addField()
InfluxDB2\Point::addField |
( |
| $key, |
|
|
| $value ) |
Adds or replaces a field value for a point.
- Parameters
-
[Object] | key the tag name |
[Object] | value the tag value |
- Returns
- Point
◆ addTag()
InfluxDB2\Point::addTag |
( |
| $key, |
|
|
?string | $value ) |
Adds or replaces a tag value for a point.
- Parameters
-
| [Object] | key the tag name |
string | object | null | $value | the tag value, can be "object" with "__toString" function or "object" implements Stringable interface |
- Returns
- Point
◆ fromArray()
static InfluxDB2\Point::fromArray |
( |
| $data | ) |
|
|
static |
Create DataPoint instance from specified data.
- Parameters
-
- Returns
- Point
◆ getPrecision()
InfluxDB2\Point::getPrecision |
( |
| ) |
|
◆ time()
InfluxDB2\Point::time |
( |
| $time, |
|
|
| $precision = null ) |
Updates the timestamp for the point.
- Parameters
-
[Object] | time the timestamp |
[WritePrecision] | precision the timestamp precision |
- Returns
- Point
◆ toLineProtocol()
InfluxDB2\Point::toLineProtocol |
( |
| ) |
|
If there is no field then return null.
- Returns
- string representation of the point
The documentation for this class was generated from the following file: