Socket
Socket
Sign inDemoInstall

amazon-qldb-driver-nodejs

Package Overview
Dependencies
144
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2Next

3.1.0

Diff

bwinchester
published 3.0.1 •

Changelog

Source

3.0.1 (2022-11-04)

This is a minor release to incorporate a recent PR by the community: 245

:bug: Bug Fixes

  • When the driver session is not live and a new one needs to be created and returned to the callee, the session is null resulting on an error: Cannot read properties of null (reading 'executeLambda'). The problem is that session var is not getting the new session recently created and it fails by returning null. It should re-up a connection and replace the driver object with the new session to the database.
allimn
published 3.0.0 •

Changelog

Source

3.0.0 (2022-09-26)

All the changes are introduced by SDK V3, please check Migrating to the AWS SDK for JavaScript V3 to learn how to migrate to the AWS SDK for JavaScript V3 from AWS SDK for JavaScript V2.

:tada: Enhancements

:bug: Bug Fixes

  • Fixed a order of operations bug in defaultBackoffFunction which would add up-to 10s of sleep over 4 retries, versus less than 300 ms total sleep between 4 retries. The defaultBackoffFunction strategy is defaulted if users do not provide their own backoff strategy function for the RetryConfig.

:boom: Breaking changes

  • Changed driver constructor to take a new type of qldbClientOptions and added a new parameter httpOptions to configure the low level node http client separately. Application code needs to be modified for driver construction. For example, the following:
import { Agent } from 'https';
import { QldbDriver, RetryConfig  } from 'amazon-qldb-driver-nodejs';

const maxConcurrentTransactions: number = 10;

const agentForQldb: Agent = new Agent({
    keepAlive: true,
    maxSockets: maxConcurrentTransactions
});

const serviceConfigurationOptions = {
    region: "us-east-1",
    httpOptions: {
        agent: agentForQldb
    }
};

const qldbDriver: QldbDriver = new QldbDriver("testLedger", serviceConfigurationOptions, maxConcurrentTransactions);

Should be changed to

import { Agent } from 'https';
import { QldbDriver, RetryConfig  } from 'amazon-qldb-driver-nodejs';
import { NodeHttpHandlerOptions } from "@aws-sdk/node-http-handler";

const maxConcurrentTransactions: number = 10;

const lowLevelClientHttpOptions: NodeHttpHandlerOptions = {
    httpAgent: new Agent({
      keepAlive: true,
      maxSockets: maxConcurrentTransactions
    })
};

const serviceConfigurationOptions = {
    region: "us-east-1"
};

const qldbDriver: QldbDriver = new QldbDriver("testLedger", serviceConfigurationOptions, lowLevelClientHttpOptions, maxConcurrentTransactions);
byronlin92
published 2.2.0 •

Changelog

Source

2.2.0

This release is focused on improving the retry logic, optimizing it and handling more possible failures, as well as more strictly defining the API to help prevent misuse. These changes are potentially breaking if the driver is being used in a way that isn't supported by the documentation.

:tada: Enhancements

  • Improved retry logic
    • Failures when starting a new session are now retried.
    • Dead sessions are immediately discarded, reducing latency when using the driver.
    • ClientError, DriverClosedError, LambdaAbortedError, and SessionPoolEmptyError are now exported.
    • Peer dependency aws-sdk bumped to 2.841.0 or greater, which gives visibility to CapacityExceededException.
  • Updated the exponential backoff algorithm to better align with the algorithm specified here.
  • Specify minimum Node.js version to 10.0 in package.json.

:warning: API Clean-up

These changes either remove unintentionally exported modules or remove the use of any. Updating to 2.2.0 should not break any documented usage of the driver and should not require code changes. If something is now incompatible and it's believed that it should be, please open an issue.

  • TypeScript: updated executeLambda signature

    • // Old
      async ExecuteLambda(transactionLambda: (transactionExecutor: TransactionExecutor) => any,
          retryConfig?: RetryConfig): Promise<any>;
      // New
      async ExecuteLambda<Type>(transactionLambda: (transactionExecutor: TransactionExecutor) => Promise<Type>,
          retryConfig?: RetryConfig): Promise<Type>;
      
    • The returned value from the transactionLambda is what ExecuteLambda returns, so it's now strictly defined by the Type.

    • The transactionLambda must return a Promise, as any methods called on the TransactionExecutor must be awaited for the driver to properly function.

  • JavaScript: removed QldbDriver.getSession()

    • This is unavailable to TypeScript users and was not intended to be called directly by JavaScript users.
  • Module exports

    • Removed Transaction from the exports list.
    • Removed modules being accessible when importing from amazon-qldb-driver-nodejs/src.
    • TypeScript: Removed constructors in the API for some exported types.

:bug: Bug Fixes

  • Fixed a bug where No open transaction or Transaction already open errors would occur
allimn
published 2.1.1 •

Changelog

Source

2.1.1

  • Export ResultReadable.
  • Change the return type of executeAndStreamResults() from Readable to ResultReadable which extends Readable.
  • getConsumedIOs(): IOUsage and getTimingInformation(): TimingInformation functions, are accessible through ResultReadable.
saumehta
published 2.1.0 •

Changelog

Source

2.1.0

Add support for obtaining basic server-side statistics on individual statement executions.

:tada: Enhancements

  • Added IOUsage and TimingInformation interface to provide server-side execution statistics
    • IOUsage provides getReadIOs(): number
    • TimingInformation provides getProcessingTimeMilliseconds(): number
    • Added getConsumedIOs(): IOUsage and getTimingInformation(): TimingInformation to the Result and ResultStream
    • getConsumedIOs(): IOUsage and getTimingInformation(): TimingInformation methods are stateful, meaning the statistics returned by them reflect the state at the time of method execution
allimn
published 2.0.0 •

Changelog

Source

2.0.0 (2020-08-27)

The release candidate 1 (v2.0.0-rc.1) has been selected as a final release of v2.0.0. No new changes are introduced between v2.0.0-rc.1 and v2.0.0. Please check the release notes

yohanmartin
published 2.0.0-rc.1 •

Changelog

Source

2.0.0-rc.1 (2020-08-13)

Note: This version is a release candidate. We might introduce some additional changes before releasing v2.0.0.

:tada: Enchancements

  • Added support for defining customer retry config and backoffs.

:boom: Breaking changes

  • Renamed QldbDriver property poolLimit to maxConcurrentTransactions.

  • Removed QldbDriver property poolTimeout.

  • Removed retryIndicator from QldbSession.executeLambda method and replaced it with retryConfig.

  • Moved retryLimit from QldbDriver constructor to RetryConfig constructor.

  • The classes and methods marked deprecated in version v1.0.0 have now been removed. List of classes and methods:

    • PooledQldbDriver has been removed. Please use QldbDriver instead.
    • QldbSession.getTableNames method has been removed. Please use QldbDriver.getTableNames method instead.
    • QldbSession.executeLambda method has been removed. Please use QldbDriver.executeLambda method instead.
yohanmartin
published 1.0.0 •

Changelog

Source

1.0.0 (2020-06-05)

The release candidate 2 (v1.0.0-rc.2) has been selected as a final release of v1.0.0. No new changes are introduced between v1.0.0-rc.2 and v1.0.0. Please check the release notes

yohanmartin
published 1.0.0-rc.2 •

Changelog

Source

1.0.0-rc.2 (2020-05-29)

:tada: Enhancements

  • Session pooling functionality moved to QldbDriver. More details can be found in the release notes

:bug: Fixes

  • Fixed the delay calculation logic when retrying the transaction due to failure.

:warning: Deprecated

  • PooledQldbDriver has been deprecated and will be removed in future versions. Please use QldbDriver instead. Refer to the release notes

  • QldbSession.getTableNames method has been deprecated and will be removed in future versions. Please use QldbDriver.getTableNames method instead.

  • QldbSession.executeLambda method has been deprecated and will be removed in future versions. Please use QldbDriver.executeLambda method instead.

2Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc