CloudDatabase class abstract

Allows access to cloud storage. Implementations of this class should be able to store and retrieve data from the cloud storage in secure manner. This is mainly used to store data on cloud via actions for the SDK.

This abstraction provides access to the cloud storage that is NoSQL in nature. The storage is organized in a tree like structure.

Each node in the tree is a document. Each document can have a list of sub-Collections and each sub-Collection can have a list of documents.

Each document can have a list of key-value pairs. The key is a string and the value is an object. The object can be any primitive type or a list or map of primitive types depending on the implementation.

identifier is used to identify the instance of the cloud storage this SDK session is using. This is used to separate data for different projects and users. The actual identity of this identifier depends on the implementation.

Inheritance
Implementers

Constructors

CloudDatabase(String identifier, PublishSource publishSource)
Creates a new instance of with the given identifier. The identifier cannot be empty. The actual identity of this depends on the implementation.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
identifier String
Used to identify the instance of the cloud storage this SDK session is using. This is used to separate data for different projects and users. The actual identity of this depends on the implementation.
final
publishSource PublishSource
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDocument(String path, {String? documentId, bool autoGenerateId = false, bool skipCreationIfDocumentExists = true, required Map<String, dynamic> value}) Future<bool>
Adds a document to the cloud storage at the given path.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getDocumentData(String path, String documentId) Future<Map<String, dynamic>>
Retrieves the document data from the cloud storage at the given path with the given documentId.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeDocument(String path, String documentId) Future<bool>
Removes a document from the cloud storage at the given path with the given documentId.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
streamCollectionToVariable(String path, Observable<VariableData> variable, {required List<WhereQueryFilter> whereFilters, required List<OrderByQueryFilter> orderByOperations, int? limit, required ScopedValues scopedValues, required NullSubstitutionMode nullSubstitutionMode}) → void
streamDocument(String path, String documentId) Stream<Map<String, dynamic>>
Streams document data from the cloud storage at the given path with the given documentId.
streamDocumentToVariable(String path, String documentId, Observable<VariableData> variable) → void
Streams document data from the cloud storage at the given path with the given documentId and updates the given variable with the data when there is an update.
toString() String
A string representation of this object.
inherited
updateDocument(String path, {required String documentId, required Map<String, dynamic> value}) Future<bool>
Updates a document in the cloud storage at the given path with the given documentId.

Operators

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