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

cawsPath → String
The full CARP Web Service (CAWS) path to this collection.
no setter
collectionUri → String
The full URI for the collection endpoint for this CollectionReference.
no setter
collectionUriByID → String
The full URI for the collection endpoint for this CollectionReference by its unique id.
no setter
documents → Future<List<DocumentSnapshot>>
Get the documents in this collection.
no setter
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
no setterinherited
id → int?
ID of the referenced collection.
no setter
name → String
The name of the referenced collection.
no setter
path → String
Returns the path of this collection (relative to the root of the web service).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
service ↔ CarpBaseService
getter/setter pairinherited
studyId → String
The id of the study for this document.
no setter

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<void>
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 nonexistent method or property is accessed.
inherited
rename(String newName) → Future<void>
Rename this collection.
toString() → String
A string representation of this object.
override

Operators

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