amazon-qldb-driver-nodejs
Advanced tools
Changelog
3.0.1 (2022-11-04)
This is a minor release to incorporate a recent PR by the community: 245
Changelog
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.
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
.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);
Changelog
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.
ClientError
, DriverClosedError
, LambdaAbortedError
, and SessionPoolEmptyError
are now exported.aws-sdk
bumped to 2.841.0
or greater, which gives visibility to CapacityExceededException
.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()
Module exports
Transaction
from the exports list.amazon-qldb-driver-nodejs/src
.No open transaction
or Transaction already open
errors would occurChangelog
2.1.1
ResultReadable
.executeAndStreamResults()
from Readable
to ResultReadable
which extends Readable
.getConsumedIOs(): IOUsage
and getTimingInformation(): TimingInformation
functions, are accessible through ResultReadable
.Changelog
2.1.0
Add support for obtaining basic server-side statistics on individual statement executions.
IOUsage
and TimingInformation
interface to provide server-side execution statistics
getReadIOs(): number
getProcessingTimeMilliseconds(): number
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 executionChangelog
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
Changelog
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.
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.Changelog
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
Changelog
1.0.0-rc.2 (2020-05-29)
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.