removeByExample method

Future<int> removeByExample(
  1. Map<String, dynamic> example,
  2. {bool waitForSync,
  3. int limit}
)

Implementation

Future<int> removeByExample(
  Map<String, dynamic> example, {
  bool waitForSync,
  int limit,
}) async {
  final resp = await _connection.request(
    method: 'PUT',
    path: '/_api/simple/remove-by-example',
    body: {
      if (waitForSync != null) 'waitForSync': waitForSync,
      if (limit != null) 'limit': limit,
      'example': example,
      'collection': name,
    },
  );
  return resp.body['deleted'];
}