Options
All
  • Public
  • Public/Protected
  • All
Menu

Firebase Cloud Firestore Event Tools.

namespace

Index

Functions

  • addDocument(collectionName: string, variable: Variable, callbackStateVariable?: Variable): void
  • Adds a variable in a collection as document with a unique name.

    Parameters

    • collectionName: string

      The collection where to store the variable.

    • variable: Variable

      The variable to write.

    • Optional callbackStateVariable: Variable

    Returns void

  • deleteDocument(collectionName: string, documentName: string, callbackStateVariable?: Variable): void
  • Deletes a document.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document to delete.

    • Optional callbackStateVariable: Variable

    Returns void

  • deleteField(collectionName: string, documentName: string, field: string, callbackStateVariable?: Variable): void
  • Deletes a field of a document.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document where to delete a field.

    • field: string

      The field to delete.

    • Optional callbackStateVariable: Variable

    Returns void

  • executeQuery(queryID: string, callbackValueVariable?: Variable, callbackStatusVariable?: Variable): void
  • Execute a query and store results in a callback variable.

    Parameters

    • queryID: string

      The query to execute.

    • Optional callbackValueVariable: Variable
    • Optional callbackStatusVariable: Variable

    Returns void

  • getDocument(collectionName: string, documentName: string, callbackValueVariable?: Variable, callbackStateVariable?: Variable): void
  • Gets a document and store it in a variable.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document to get.

    • Optional callbackValueVariable: Variable
    • Optional callbackStateVariable: Variable

    Returns void

  • getField(collectionName: string, documentName: string, field: string, callbackValueVariable?: Variable, callbackStateVariable?: Variable): void
  • Gets a field of a document and store it in a variable.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document.

    • field: string

      The field to get.

    • Optional callbackValueVariable: Variable
    • Optional callbackStateVariable: Variable

    Returns void

  • getServerTimestamp(): string
  • Returns a special string replaced by a firebase serverTimestamp field value.

    Returns string

  • hasDocument(collectionName: string, documentName: string, callbackValueVariable?: Variable, callbackStateVariable?: Variable): void
  • Checks for existence of a document.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document to check.

    • Optional callbackValueVariable: Variable
    • Optional callbackStateVariable: Variable

    Returns void

  • hasField(collectionName: string, documentName: string, field: string, callbackValueVariable?: Variable, callbackStateVariable?: Variable): void
  • Checks for existence of a field.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document.

    • field: string

      The field to check.

    • Optional callbackValueVariable: Variable
    • Optional callbackStateVariable: Variable

    Returns void

  • listDocuments(collectionName: string, callbackValueVariable?: Variable, callbackStateVariable?: Variable): void
  • Lists all the documents in a collection.

    deprecated

    Use a query without filters instead.

    Parameters

    • collectionName: string

      The collection where to count documents.

    • Optional callbackValueVariable: Variable
    • Optional callbackStateVariable: Variable

    Returns void

  • queryLimit(queryID: string, amount: number, last: boolean): void
  • Limits the amount of documents returned by the query.

    Parameters

    • queryID: string

      The query to add the filter to.

    • amount: number

      The amount of documents to limit to

    • last: boolean

      If true, limits to the last documents instead of the first documents.

    Returns void

  • queryOrderBy(queryID: string, field: string, direction: OrderByDirection): void
  • Orders the documents in a query.

    Parameters

    • queryID: string

      The query to add the filter to.

    • field: string

      The field to order by.

    • direction: OrderByDirection

      The direction of ordering (ascending or descending).

    Returns void

  • querySkipSome(queryID: string, value: number, before: boolean, includeSelf: boolean): void
  • Makes a query skip documents after or before a certain value of a field the query was ordered with.

    Parameters

    • queryID: string

      The query to add the filter to.

    • value: number

      The value of the field ordered by.

    • before: boolean

      If set to true, all documents before the document are skipped, else all documents after it are skipped.

    • includeSelf: boolean

      If set to true, doesn't skip the document.

    Returns void

  • queryWhere(queryID: string, field: string, op: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains", value: string | number): void
  • Filters out documents whose fields do not match a condition from a query.

    Parameters

    • queryID: string

      The query to add the filter to.

    • field: string

      The field to run the condition on.

    • op: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains"

      The condition operator.

    • value: string | number

      The value to check against.

    Returns void

  • startQuery(queryID: string, collectionName: string): void
  • Initiate a query over a collection.

    Parameters

    • queryID: string

      The name of the new query.

    • collectionName: string

      The name of the collection to query.

    Returns void

  • startQueryFrom(queryID: string, sourceQueryID: string): void
  • Create a new query from a base query.

    Parameters

    • queryID: string

      The name of the new query.

    • sourceQueryID: string

      The name of the source query.

    Returns void

  • updateDocument(collectionName: string, variableName: string, variable: Variable, callbackStateVariable?: Variable): void
  • Updates a variable/document.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • variableName: string

      The name under which the variable will be saved (document name).

    • variable: Variable

      The variable to update.

    • Optional callbackStateVariable: Variable

    Returns void

  • updateField(collectionName: string, documentName: string, field: string, value: any, callbackStateVariable?: Variable): void
  • Updates a field of a document.

    Parameters

    • collectionName: string

      The collection where the document is stored.

    • documentName: string

      The name of the document where to update a field.

    • field: string

      The field where to update.

    • value: any

      The value to write.

    • Optional callbackStateVariable: Variable

    Returns void

  • watchQuery(queryID: string, callbackValueVariable?: Variable, callbackStatusVariable?: Variable): void
  • Watch a query and store results in a callback variable whenever a documents starts/stops matching the query or a document matching the query is modified.

    Parameters

    • queryID: string

      The query to execute.

    • Optional callbackValueVariable: Variable
    • Optional callbackStatusVariable: Variable

    Returns void

  • writeDocument(collectionName: string, variableName: string, variable: Variable, callbackStateVariable?: Variable): void
  • Writes a variable in a collection as document.

    Parameters

    • collectionName: string

      The collection where to store the variable.

    • variableName: string

      The name under which the variable will be saved (document name).

    • variable: Variable

      The variable to write.

    • Optional callbackStateVariable: Variable

    Returns void

  • writeField(collectionName: string, documentName: string, field: string, value: any, callbackStateVariable?: Variable, merge?: boolean): void
  • Writes a field of a document.

    Parameters

    • collectionName: string

      The collection where to store the document.

    • documentName: string

      The name of the document where to write a field.

    • field: string

      The field where to write.

    • value: any

      The value to write.

    • Optional callbackStateVariable: Variable
    • merge: boolean = true

    Returns void

Generated using TypeDoc