-
Notifications
You must be signed in to change notification settings - Fork 10
/
delete_service.dart
56 lines (52 loc) · 1.37 KB
/
delete_service.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
part of influxdb_client_api;
class DeleteService extends DefaultService {
late DeleteApi _service;
DeleteService(InfluxDBClient client) : super(client) {
_service = DeleteApi(client.getApiClient());
}
/// Delete time series data from InfluxDB
///
/// Parameters:
///
/// * [DateTime] start;
/// RFC3339Nano
///
/// * [DateTime] stop;
/// RFC3339Nano
///
/// * [String] predicate;
/// InfluxQL-like delete statement
///
/// * [String] zapTraceSpan:
/// OpenTracing span context
///
/// * [String] org:
/// Specifies the organization to delete data from.
///
/// * [String] bucket:
/// Specifies the bucket to delete data from.
///
/// * [String] orgID:
/// Specifies the organization ID of the resource.
///
/// * [String] bucketID:
/// Specifies the bucket ID to delete data from.
Future<void> delete(
{required DateTime start,
required DateTime stop,
String? predicate,
String? zapTraceSpan,
String? org,
String? bucket,
String? orgID,
String? bucketID}) async {
var deletePredicateRequest =
DeletePredicateRequest(start: start, stop: stop, predicate: predicate);
return await _service.postDelete(deletePredicateRequest,
zapTraceSpan: zapTraceSpan,
org: org,
bucket: bucket,
orgID: orgID,
bucketID: bucketID);
}
}