batchWrite method

void batchWrite(
  1. dynamic data, {
  2. String? bucket,
  3. String? org,
  4. WritePrecision? precision,
})

Write data (Point, String and collection is supported). bucket specifies the destination bucket for writes org specifies target organization precision specifies write precission

Implementation

void batchWrite(dynamic data,
    {String? bucket, String? org, WritePrecision? precision}) {
  precision ??= writeOptions!.precision;
  bucket ??= influxDB.bucket;
  org ??= influxDB.org;

  _checkNotNull('precision', precision);
  _checkNotNull('bucket', bucket);
  _checkNotNull('org', org);

  var payload = _payload(data, precision, bucket!, org!, true);
  _writeBatch.push(payload);
}