Index
Constructors
Methods
Constructors
Private constructor
- 
							Returns Transaction
Methods
delete
- 
							Deletes the document referred to by the provided DocumentReference.Parameters- 
									documentRef: DocumentReference<any>A reference to the document to be deleted. 
 Returns TransactionThis Transactioninstance. Used for chaining method calls.
- 
									
get
- 
							Reads the document referenced by the provided DocumentReference.Type parameters- 
									T
 Parameters- 
									documentRef: DocumentReference<T>A reference to the document to be read. 
 Returns Promise<DocumentSnapshot<T>>A DocumentSnapshot for the read data. 
- 
									
set
- 
							Writes to the document referred to by the provided DocumentReference. If the document does not exist yet, it will be created. If you passSetOptions, the provided data can be merged into the existing document.Type parameters- 
									T
 Parameters- 
									documentRef: DocumentReference<T>A reference to the document to be set. 
- 
									data: Partial<T>An object of the fields and values for the document. 
- 
									options: SetOptionsAn object to configure the set behavior. 
 Returns TransactionThis Transactioninstance. Used for chaining method calls.
- 
									
- 
							Writes to the document referred to by the provided DocumentReference. If the document does not exist yet, it will be created. If you passSetOptions, the provided data can be merged into the existing document.Type parameters- 
									T
 Parameters- 
									documentRef: DocumentReference<T>A reference to the document to be set. 
- 
									data: TAn object of the fields and values for the document. 
 Returns TransactionThis Transactioninstance. Used for chaining method calls.
- 
									
update
- 
							Updates fields in the document referred to by the provided DocumentReference. The update will fail if applied to a document that does not exist.Parameters- 
									documentRef: DocumentReference<any>A reference to the document to be updated. 
- 
									data: UpdateDataAn object containing the fields and values with which to update the document. Fields can contain dots to reference nested fields within the document. 
 Returns TransactionThis Transactioninstance. Used for chaining method calls.
- 
									
- 
							Updates fields in the document referred to by the provided DocumentReference. The update will fail if applied to a document that does not exist.Nested fields can be updated by providing dot-separated field path strings or by providing FieldPath objects. Parameters- 
									documentRef: DocumentReference<any>A reference to the document to be updated. 
- 
									field: string | FieldPathThe first field to update. 
- 
									value: anyThe first value. 
- 
									Rest ...moreFieldsAndValues: any[]Additional key/value pairs. 
 Returns TransactionA Promise resolved once the data has been successfully written to the backend (Note that it won't resolve while you're offline). 
- 
									
A reference to a transaction. The
Transactionobject passed to a transaction's updateFunction provides the methods to read and write data within the transaction context. SeeFirestore.runTransaction().