Options
All
  • Public
  • Public/Protected
  • All
Menu
deprecated

Use QldbDriver.executeLambda instead to execute transactions.

Hierarchy

  • Transaction

Implements

Index

Constructors

constructor

Properties

Private _communicator

_communicator: Communicator

Private _hashLock

_hashLock: Lock

Private _isClosed

_isClosed: boolean

Private _txnHash

_txnHash: QldbHash

Private _txnId

_txnId: string

Methods

Private _internalClose

  • _internalClose(): void

Private _sendExecute

  • _sendExecute(statement: string, parameters: any[]): Promise<ExecuteStatementResult>
  • Parameters

    • statement: string
    • parameters: any[]

    Returns Promise<ExecuteStatementResult>

abort

  • abort(): Promise<void>
  • deprecated

    [NOT RECOMMENDED] It is not recommended to use this method during transaction execution. Instead, please use QldbDriver.executeLambda to execute the transaction.

    Returns Promise<void>

commit

  • commit(): Promise<void>
  • deprecated

    [NOT RECOMMENDED] It is not recommended to use this method during transaction execution. Instead, please use QldbDriver.executeLambda to execute the transaction.

    Returns Promise<void>

execute

  • execute(statement: string, ...parameters: any[]): Promise<Result>
  • deprecated

    [NOT RECOMMENDED] It is not recommended to use this method during transaction execution. Instead, please use QldbDriver.executeLambda to execute the transaction.

    Execute the specified statement in the current transaction. This method returns a promise which eventually returns all the results loaded into memory.

    throws

    Error when the passed argument value cannot be converted into Ion

    Parameters

    • statement: string

      A statement to execute against QLDB as a string.

    • Rest ...parameters: any[]

      Variable number of arguments, where each argument corresponds to a placeholder (?) in the PartiQL query. The argument could be any native JavaScript type or an Ion DOM type. Details of Ion DOM type and JavaScript type

    Returns Promise<Result>

    Promise which fulfills with all results loaded into memory

executeAndStreamResults

  • executeAndStreamResults(statement: string, ...parameters: any[]): Promise<Readable>
  • deprecated

    [NOT RECOMMENDED] It is not recommended to use this method during transaction execution. Instead, please use QldbDriver.executeLambda to execute the transaction.

    throws

    TransactionClosedError when the transaction is closed.

    throws

    Error when the passed argument value cannot be converted into Ion

    Parameters

    • statement: string

      A statement to execute against QLDB as a string.

    • Rest ...parameters: any[]

      Variable number of arguments, where each argument corresponds to a placeholder (?) in the PartiQL query. The argument could be any native JavaScript type or an Ion DOM type. Details of Ion DOM type and JavaScript type

    Returns Promise<Readable>

    Promise which fulfills with a Readable Stream

getTransactionId

  • getTransactionId(): string
  • deprecated

    [NOT RECOMMENDED] It is not recommended to use this method during transaction execution. Instead, please use QldbDriver.executeLambda to execute the transaction.

    Retrieve the transaction ID associated with this transaction.

    Returns string

    The transaction ID.

Generated using TypeDoc