A class to handle lambda execution.

Hierarchy

  • TransactionExecutor

Properties

_transaction: Transaction

Methods

  • 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 executeLambda) completes.

    Returns

    Promise which fulfills with all results loaded into memory

    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>

  • 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 executeLambda) completes.

    Returns

    Promise which fulfills with a Readable Stream

    Throws

    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>

Generated using TypeDoc