batchDelete method

Future<BatchDeleteResult> batchDelete(
  1. String collection,
  2. List<String> ids
)

Performs batch delete

Implementation

Future<BatchDeleteResult> batchDelete(
  String collection,
  List<String> ids,
) async {
  final response = await _client.post(
    Uri.parse('$baseUrl/database/collections/$collection/batch-delete'),
    headers: _headers,
    body: jsonEncode({'ids': ids}),
  );

  final data = _handleResponse(response);
  return BatchDeleteResult.fromJson(data);
}