Member Junction
    Preparing search index...

    PostgreSQL implementation of the TransactionGroupBase. Uses a dedicated pg.PoolClient with BEGIN/COMMIT/ROLLBACK to wrap all transaction items in a single database transaction.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get PendingTransactions(): TransactionItem[]

      Returns TransactionItem[]

    • get Status(): "Pending" | "In Progress" | "Complete" | "Failed"

      Returns "Pending" | "In Progress" | "Complete" | "Failed"

    • get TransactionNotifications$(): Observable<
          { error?: any; results?: TransactionResult[]; success: boolean },
      >

      Returns Observable<{ error?: any; results?: TransactionResult[]; success: boolean }>

    • get Variables(): TransactionVariable[]

      The array of variables that are to be used within the transaction group. These are used to pass data from one transaction item to another. See documentation on TransactionVariable

      Returns TransactionVariable[]

    Methods

    • This is used by the BaseEntity/Provider objects to manage transactions on your behalf. WARNING: Do NOT directly call this method. Instead set the TransactionGroup property on the

      Parameters

      Returns void

      class to make an entity object part of a transaction group.

    • Indicates whether all of the entities that have registered with this transaction group have completed their preprocessing

      Returns boolean

    • If an entity object needs to conduct any type of asynchronous preprocessing before a transaction is submitted, it must notify its transaction group that it is doing so with this method. This causes the TransactionGroup to wait for all preprocessing to be completed before submitting the transaction. This method checks to see if an the entity has already been registered for preprocessing and if so, does nothing.

      Parameters

      Returns void

    • This utility method is to be used by sub-classes to set the values of the variables on the BaseEntity objects before the transaction is executed for variables that are defined as 'Use' type. This is used to pass values from one transaction item to another.

      Parameters

      Returns number

      the number of values set on the entity object

    • This utility method is to be used by sub-classes to set the values of the variables on the BaseEntity objects after the transaction is executed for variables

      Parameters

      Returns number

      the number of variables that had their processed values set from the provided entity object

    • Submits the transaction group to the provider for handling. The provider will handle the actual transaction and call the callback functions

      Parameters

      • OptionalallowRetryOfFailedTransaction: boolean

        If true, the transaction group will be resubmitted even if it has failed. If false, the transaction group will not be resubmitted if it has failed.

      Returns Promise<boolean>

      true if the transaction was successful, false if it failed. If the method fails, check each of the individual BaseEntity objects within the TransactionGroup for their result histories using BaseEntity.ResultHistory and BaseEntity.LatestResult

    • Waits for all preprocessing to be complete.

      Returns Promise<void>