Class: CollectionReference

ReactiveDb.CollectionReference

Represents a handle on a collection (of documents) of the ReactiveDb service.

Instances of this class are built using the ReactiveDb#col factory method.

Members

(readonly) id :string

Identifier of the collection referred to by this instance.

Type:
  • string

Methods

doc(documentId) → {ReactiveDb.DocumentReference}

Gets a reference to a document within the collection refereed to by this instance.

Parameters:
Name Type Description
documentId string

the document identifier within the collection

Returns:
Type
ReactiveDb.DocumentReference

limit(n) → {ReactiveDb.Projectable}

Builds a new Queryable instance that will match a maximum number of documents.

Parameters:
Name Type Description
n number

The maximum number of documents to match.

Implements:
Returns:

The resulting Queryable instance may be further specialized using methods of the Projectable interface.

Type
ReactiveDb.Projectable

sortingAsc(field) → {ReactiveDb.Sortable|ReactiveDb.Limitable|ReactiveDb.Projectable}

Requests an ascending sorting order on a given document field.

Parameters:
Name Type Description
field ReactiveDb.DocumentField

The document field, which to sort on.

Implements:
Returns:

The resulting Queryable instance may be further specialized using methods of the Sortable (to add sort directives), Limitable and Projectable interfaces.

Type
ReactiveDb.Sortable | ReactiveDb.Limitable | ReactiveDb.Projectable

where(field, filter) → {ReactiveDb.Filterable|ReactiveDb.Sortable|ReactiveDb.Limitable|ReactiveDb.Projectable}

Builds a new Queryable instance by adding a filter constraint on this Queryable instance.

Parameters:
Name Type Description
field ReactiveDb.DocumentField

Field of the documents this filter constraint applies to.

filter ReactiveDb.Filter

The filter to apply to the given field.

Implements:
Returns:

The resulting Queryable instance may be further specialized using methods of the Filterable, Sortable, Limitable and Projectable interfaces.

Type
ReactiveDb.Filterable | ReactiveDb.Sortable | ReactiveDb.Limitable | ReactiveDb.Projectable
deprecated
Authentication
ServerlessDb
ReactiveDb