CollectionController class

Inheritance

Constructors

CollectionController(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

create(String index, String collection, {Map<String, dynamic> mapping = const {}}) Future<Map<String, dynamic>>
Creates a new collection, in the provided index.
deleteSpecifications(String index, String collection) Future<Map<String, dynamic>>
Deletes validation specifications for a data collection.
exists(String index, String collection) Future<bool>
Checks whether a collection exists in the index.
getMapping(String index, String collection, {bool includeKuzzleMeta = false}) Future<Map<String, dynamic>>
Returns a data collection mapping.
getSpecifications(String index, String collection) Future<Map<String, dynamic>>
Returns the validation specifications associated to the collection.
list(String index, {int? from, int? size, String? type}) Future<Map<String, dynamic>>
Returns the list of data collections associated to a provided data index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh(String index, String collection) Future<bool>
Forces an immediate reindexation of the provided collection.
scrollSpecifications(String index, String collection, String scrollId, String scroll) Future<Map<String, dynamic>>
scroll is Time to live. It resets the cursor
searchSpecifications(String index, {Map<String, dynamic> query = const {}, int? from, int? size, String? scroll}) Future<SpecificationSearchResult>
Searches collection specifications.
toString() String
A string representation of this object.
inherited
truncate(String index, String collection) Future<Map<String, dynamic>>
Empties a collection by removing all its documents, while keeping any associated mapping
update(String index, String collection, Map<String, dynamic> mappings, Map<String, dynamic> settings) Future<Map<String, dynamic>>
Updates a data collection data mappings. TODO: check if mappings/settings are optional or both are necessary
updateMapping(String index, String collection, Map<String, dynamic> mapping) Future<Map<String, dynamic>>
Updates a data collection data mapping.
updateSpecifications(String index, String collection, Map<String, dynamic> specifications) Future<Map<String, dynamic>>
You can specify validation specifications in order to enforce your own rules over documents and real-time messages. Whenever a document is stored or updated, or a message is published, Kuzzle applies these specifications to check if the new data complies to the defined rules. If not, the document or message will be rejected and the request will return an error message.
validateSpecifications(String index, String collection, Map<String, dynamic> specifications) Future<bool>
The validateSpecifications method checks if a validation specification is well formatted. It does not store nor modify the existing specification.

Operators

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