Internal class used by TransactionGroupBase and sub-classes to manage individual transactions

Constructors

  • Creates a new TransactionItem

    Parameters

    • baseEntity: BaseEntity<unknown>

      The base entity object this transaction is associated with

    • operationType: "Create" | "Update" | "Delete"

      The type of operation (Create, Update, Delete)

    • instruction: string

      The SQL or GraphQL instruction to execute

    • vars: any

      Variables to pass to the SQL or GraphQL

    • extraData: any

      Additional data needed for processing by the provider

    • callBack: ((result, success) => void)

      Callback function that gets called when the transaction completes

        • (result, success): void
        • Parameters

          • result: Record<string, any>
          • success: boolean

          Returns void

    Returns TransactionItem

Properties

_baseEntity: BaseEntity<unknown>
_callBack: ((result, success) => void)

Callback function to call when the transaction is complete

Type declaration

    • (result, success): void
    • Parameters

      • result: Record<string, any>

        The result of the transaction - a row/record with field name/value pairs

      • success: boolean

        Whether the transaction completed successfully

      Returns void

_extraData: any
_instruction: string
_operationType: "Create" | "Update" | "Delete"
_vars: any

Accessors

  • get CallBack(): ((result, success) => void)
  • Callback function that gets called when the transaction is complete

    Returns ((result, success) => void)

    A function that takes a result object (database row) and a success boolean

      • (result, success): void
      • Parameters

        • result: Record<string, any>
        • success: boolean

        Returns void