createOrReplace method
Creates a new document in the persistent data storage, or replaces its content if it already exists.
Implementation
Future<Map<String, dynamic>> createOrReplace(
String index,
String collection,
String id,
Map<String, dynamic> document, {
bool waitForRefresh = false,
}) async {
final response = await kuzzle.query(KuzzleRequest(
controller: name,
action: 'createOrReplace',
index: index,
collection: collection,
uid: id,
body: document,
waitForRefresh: waitForRefresh,
));
return response.result as Map<String, dynamic>;
}