DocumentController class

Inheritance

Constructors

DocumentController(Kuzzle kuzzle)

Properties

accessor String?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
kuzzle Kuzzle
finalinherited
name String?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

count(String index, String collection, {Map<String, dynamic> query = const {}}) Future<int>
Counts documents in a data collection.
create(String index, String collection, Map<String, dynamic> document, {String? id, bool waitForRefresh = false}) Future<Map<String, dynamic>>
Creates a new document in the persistent data storage.
createOrReplace(String index, String collection, String id, Map<String, dynamic> document, {bool waitForRefresh = false}) Future<Map<String, dynamic>>
Creates a new document in the persistent data storage, or replaces its content if it already exists.
delete(String index, String collection, String id, {bool waitForRefresh = false}) Future<void>
Deletes a document.
deleteByQuery(String index, String collection, Map<String, dynamic> query, {bool waitForRefresh = false, String? lang}) Future<List<String>>
Deletes documents matching the provided search query.
exists(String index, String collection, String id) Future<bool>
Check if a document exists
get(String index, String collection, String id) Future<Map<String, dynamic>>
Get a document
mCreate(String index, String collection, List<Map<String, dynamic>> documents, {bool waitForRefresh = false}) Future<Map<String, dynamic>>
Creates multiple documents.
mCreateOrReplace(String index, String collection, List<Map<String, dynamic>> documents, {bool waitForRefresh = false}) Future<Map<String, dynamic>>
Creates or replaces multiple documents.
mDelete(String index, String collection, List<String> ids, {bool waitForRefresh = false}) Future<Map<String, dynamic>>
Deletes multiple documents.
mGet(String index, String collection, List<String> ids) Future<Map<String, dynamic>>
Gets multiple documents.
mReplace(String index, String collection, List<Map<String, dynamic>> documents, {bool waitForRefresh = false}) Future<Map<String, dynamic>>
Replaces multiple documents.
mUpdate(String index, String collection, List<Map<String, dynamic>> documents, {bool waitForRefresh = false, int? retryOnConflict}) Future<Map<String, dynamic>>
Updates multiple documents.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace(String index, String collection, String id, Map<String, dynamic> document, {bool waitForRefresh = false}) Future<Map<String, dynamic>>
Replaces the content of an existing document.
scroll(String index, String collection, String scrollId, {String? scroll}) Future<Map<String, dynamic>>
Moves a search cursor forward.
Searches documents.
toString() String
A string representation of this object.
inherited
update(String index, String collection, String id, Map<String, dynamic> document, {bool waitForRefresh = false, int? retryOnConflict, bool? source}) Future<Map<String, dynamic>>
####Updates a document content.
updateByQuery(String index, String collection, {required Map<String, dynamic> searchQuery, required Map<String, dynamic> changes, bool waitForRefresh = false, bool source = false, String? lang}) Future<Map<String, dynamic>>
Updates documents matching the provided search query. Documents updated that way trigger real-time notifications.
upsert(String index, String collection, String id, Map<String, dynamic> changes, {Map<String, dynamic> defaults = const {}, bool waitForRefresh = false, int? retryOnConflict, bool? source}) Future<Map<String, dynamic>>
####Applies a partial update to an existing document. If the document doesn't already exist, a new document is created.
validate(String index, String collection, Map<String, dynamic> document) Future<bool>
Validates data against existing validation rules.

Operators

operator ==(Object other) bool
The equality operator.
inherited