Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GeoTransaction

A reference to a transaction. The GeoTransaction object passed to a transaction's updateFunction provides the methods to read and write data within the transaction context. See GeoFirestore.runTransaction().

Hierarchy

  • GeoTransaction

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private _transaction

_transaction: Transaction | Transaction

Methods

delete

get

set

  • Writes to the document referred to by the provided GeoDocumentReference or DocumentReference. If the document does not exist yet, it will be created. If you pass SetOptions, the provided data can be merged into the existing document.

    Parameters

    • documentRef: GeoDocumentReference | DocumentReference | DocumentReference

      A reference to the document to be set.

    • data: DocumentData

      An object of the fields and values for the document.

    • Optional options: SetOptions

      An object to configure the set behavior. Includes custom key for location in document.

    Returns GeoTransaction

    This GeoTransaction instance. Used for chaining method calls.

update

  • Updates fields in the document referred to by the provided GeoDocumentReference or DocumentReference. The update will fail if applied to a document that does not exist.

    Parameters

    • documentRef: GeoDocumentReference | DocumentReference | DocumentReference

      A reference to the document to be updated.

    • data: UpdateData

      An object containing the fields and values with which to update the document. Fields can contain dots to reference nested fields within the document.

    • Optional customKey: string

      The key of the document to use as the location. Otherwise we default to coordinates.

    Returns GeoTransaction

    This GeoTransaction instance. Used for chaining method calls.

Generated using TypeDoc