run method
Implementation
FutureOr<dynamic> run(String query,
{bool count = true,
int batchSize = 2,
Map<String, dynamic>? options}) async {
var request = client.prepareRequest('/_api/cursor', methode: 'post');
if (options != null) {
request.body = jsonEncode({
'query': query,
'count': count,
'batchSize': batchSize,
'options': options
});
} else {
request.body =
jsonEncode({'query': query, 'count': count, 'batchSize': batchSize});
}
var doc = await client.exec(request);
if (doc['error']) {
print(doc['errorMessage']);
return null;
} else {
return doc;
}
}