Class EntityPartialUpdateBuilder<T>

Type Parameters

Hierarchy

Constructors

Properties

entity: T
operations: UpdateOperation[] = []

Methods

  • Private

    Adds an update operation on the partial update

    Returns

    Parameters

    • path: string

      The path which gets modified by the operation

    • operator: string

      The operator of the operation to add

    • Optional value: any

      The value used to execute the operation

    Returns EntityPartialUpdateBuilder<T>

  • Executes the partial update

    Returns

    The promise resolves when the partial update has been executed successfully

    Abstract

    Returns Promise<T>

  • Private

    Checks whether an operation on the field exists already

    Returns

    True, if the operation does exist

    Parameters

    • path: string

      The path where the operation is executed on

    Returns boolean

  • Puts an item from an array or map

    Returns

    Parameters

    • field: string

      The field to perform the operation on

    • key: string | number | {
          [key: string]: any;
      }

      The map key to put the value to or an object of arguments

    • Optional value: any

      The value to put if a key was used

    Returns EntityPartialUpdateBuilder<T>

  • Replaces an item at a given index

    Returns

    Parameters

    • path: string

      The path to perform the operation on

    • index: number

      The index where the item will be replaced

    • item: any

      The item to replace with

    Returns EntityPartialUpdateBuilder<T>

  • Returns a JSON representation of this partial update

    Returns

    Returns Json

Generated using TypeDoc