CollectionReference class

Provide a collection reference to a CARP web service.

The Collections endpoint allows you to store and query custom documents to suit your specific application's needs.

Note that the collection / document structure is like this:

collection/document/collection/document/...

I.e., that a collection holds a list of documents, which each can hold a list of collections, etc. For example, the following

activities/running/geopositions/pos_1

is a reference to the geoposition document pos_1 in the collection geopositions in the document running in the collection activities.

Inheritance

Properties

carpPath → String
The full CARP web service path to this collection.
read-only
collectionUri → String
The full URI for the collection endpoint for this CollectionReference.
read-only
collectionUriByID → String
The full URI for the collection endpoint for this CollectionReference by its unique id.
read-only
documents → Future<List<DocumentSnapshot>>
Get the documents in this collection.
read-only
hashCode → int
The hash code for this object. [...]
read-only, inherited
headers → Future<Map<String, String>>
read-only, inherited
id → int
ID of the referenced collection. [...]
read-only
name → String
The name of the referenced collection.
read-only
path → String
Returns the path of this collection (relative to the root of the web service).
read-only
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
service CarpService
read / write, inherited

Methods

add([String name, Map<String, dynamic> data]) → Future<DocumentReference>
Add a data document to this collection and returns a DocumentReference to this document. [...]
delete() → Future
Deletes the collection referred to by this CollectionReference.
document([String name]) DocumentReference
Returns a DocumentReference with the provided name in this collection. [...]
get() → Future<CollectionReference>
Reads the collection referenced by this CollectionReference from the server. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
rename(String newName) → Future
Rename this collection.
toString() → String
Returns a string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator. [...]
inherited