Class: DocumentAddition

ReactiveDb.DocumentAddition

Represents the addition of a document into a query.

A document addition may occur in a query if either the document is newly created or updated so that it is matched by the query from now on. You can discriminate these cases by checking the document version (1 for a newly created one, more than one for an already existing and newly matching document).

Extends

Members

(readonly) at :number

Rank of the document added to the query (in the document list associated with the query).

Type:
  • number

(readonly) doc :ReactiveDb.Document

Document associated with this instance.

It represents the state of the document just after the change, except for document removals where it represents its state juste before its removal from the query.

Type:
Overrides:

Methods

isAcknowledgement() → {boolean}

Checks whether this instance represents the acknowledgement of a document within a query.

Overrides:
Returns:
Type
boolean

isAddition() → {boolean}

Checks whether this instance represents the addition of a document into a query.

Overrides:
Returns:
Type
boolean

isMove() → {boolean}

Checks whether this instance represents the move of a document within a query.

Overrides:
Returns:
Type
boolean

isRemoval() → {boolean}

Checks whether this instance represents the removal of a document from a query.

Overrides:
Returns:
Type
boolean

isUpdate() → {boolean}

Checks whether this instance represents the update of a document within a query.

Overrides:
Returns:
Type
boolean
deprecated
Authentication
ServerlessDb
ReactiveDb