Options
All
  • Public
  • Public/Protected
  • All
Menu

A class to handle lambda execution.

Hierarchy

  • TransactionExecutor

Index

Properties

Private _transaction

_transaction: Transaction

Methods

abort

  • abort(): void

execute

  • execute(statement: string, ...parameters: any[]): Promise<Result>
  • Execute the specified statement in the current transaction. This method returns a promise which eventually returns all the results loaded into memory.

    The PartiQL statement executed via this transaction is not immediately committed. The entire transaction will be committed once the all the code in transactionFunction (passed as an argument to QldbDriver.executeLambda) completes.

    throws

    Error when the passed argument value cannot be converted into Ion

    Parameters

    • statement: string

      The statement to execute.

    • 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<ResultReadable>
  • Execute the specified statement in the current transaction. This method returns a promise which fulfills with Readable interface, which allows you to stream one record at time

    The PartiQL statement executed via this transaction is not immediately committed. The entire transaction will be committed once the all the code in transactionFunction (passed as an argument to QldbDriver.executeLambda) completes.

    throws

    {@linkcode TransactionClosedError} when the transaction is closed.

    throws

    Error when the passed argument value cannot be converted into Ion

    Parameters

    • statement: string

      The statement to execute.

    • 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<ResultReadable>

    Promise which fulfills with a Readable Stream

getTransactionId

  • getTransactionId(): string

Generated using TypeDoc