|
| __construct ($options, array $writeOptions=null, array $pointSettings=null) |
|
| write ($data, string $precision=null, string $bucket=null, string $org=null) |
|
| writeRaw (string $data, string $precision=null, string $bucket=null, string $org=null) |
|
| close () |
|
| __construct (array $options) |
|
| post ($payload, $uriPath, $queryParams) |
|
| get ($payload, $uriPath, $queryParams) |
|
| configuredClient (ClientInterface $client) |
|
| createRequest (string $method, string $uriPath, string $payload, array $headers, array $queryParams) |
|
| sendRequest (RequestInterface $request) |
|
| write ($data) |
|
|
| $writeOptions |
|
| $pointSettings |
|
| $closed = false |
|
| $options |
|
| $http |
|
|
static | log (string $level, string $message, array $options) |
|
| check ($key, $value) |
|
◆ __construct()
InfluxDB2\WriteApi::__construct |
( |
| $options, |
|
|
array | $writeOptions = null, |
|
|
array | $pointSettings = null ) |
WriteApi constructor.
- Parameters
-
| $options | |
array | null | $writeOptions | |
array | null | $pointSettings | |
◆ write()
InfluxDB2\WriteApi::write |
( |
| $data, |
|
|
string | $precision = null, |
|
|
string | $bucket = null, |
|
|
string | $org = null ) |
Write data into specified bucket
Example write data in array $writeApi->write([ ['name' => 'cpu','tags' => ['host' => 'server_nl', 'region' => 'us'], 'fields' => ['internal' => 5, 'external' => 6], 'time' => 1422568543702900257], ['name' => 'gpu', 'fields' => ['value' => 0.9999]]], WritePrecision::NS, 'my-bucket', 'my-org' )
Example write data in line protocol $writeApi->write('h2o,location=west value=33i 15')
Example write data using Point structure $point = new Point("h2o).
- Parameters
-
string | Point | array | $data | DataPoints to write into InfluxDB. The data could be represent by array, Point, string |
string | null | $precision | The precision for the unix timestamps within the body line-protocol |
- See also
- \InfluxDB2\Model\WritePrecision
- Parameters
-
string | null | $bucket | specifies the destination bucket for writes |
string | null | $org | specifies the destination organization for writes |
- Exceptions
-
◆ writeRaw()
InfluxDB2\WriteApi::writeRaw |
( |
string | $data, |
|
|
string | $precision = null, |
|
|
string | $bucket = null, |
|
|
string | $org = null ) |
Writes data using line protocol.
- Parameters
-
string | $data | payload data as string (in line protocol format) |
string | null | $precision | The precision for the unix timestamps within the body line-protocol |
string | null | $bucket | specifies the destination bucket for writes |
string | null | $org | specifies the destination organization for writes |
- Exceptions
-
- See also
- \InfluxDB2\Model\WritePrecision
The documentation for this class was generated from the following file:
- src/InfluxDB2/WriteApi.php