Release v1.0.0-rc.2 of the Amazon QLDB Driver for Node JS
Pre-releaseRelease notes for 1.0.0-rc.2
The Amazon QLDB team is pleased to announce the release V1.0.0-rc.2 of the Node.js driver. This release aims to provide some improvements in the APIs, while ensuring that there are no breaking changes.
The list of changes are included the change log
Migrating from v1.0.0-rc.1 to v1.0.0-rc.2
Note: v1.0.0-rc.2 is backward compatible with v1.0.0-rc.1. However, we do recommend you to incorporate the following suggested changes.
Session pooling functionality moved to QldbDriver
Up until and including v1.0.0-rc.1, the amazon-qldb-driver-nodejs vended two types of driver implementations: The standard QldbDriver
and a PooledQldbDriver
. As the name suggests, the PooledQldbDriver
maintained a pool of sessions which allowed you to reuse the underlying connections.
Over a period of time, we realized that customers would just want to use the pooling mechanism for its benefits instead of the standard driver.
And hence, we have decided to move the pooling functionality into QldbDriver
and deprecate PooledQldbDriver
. We will remove PooledQldbDriver
in the future versions.
This implies two changes:
-
If you have been using
PooledQldbDriver
simply replace that withQldbDriver
. The signature of the constructor and all the methods are same for both the drivers. So apart from instantiation, no more changes are required.Before
let qldbDriver: PooledQldbDriver = new PooledQdbDriver(..)
After
let qldbDriver: QldbDriver = new QldbDriver(..)
- If you have been using the standard
QldbDriver
, you can now pass the additional parameters to the constructor. Please check the documentation of QldbDriver
Helper method getTableNames
now available on the driver instance
The QldbSession exposed a helper method called getTableNames
which listed all the tables present in your ledger. This method has been deprecated and will be removed in the future versions. Instead, use getTableNames
which is now available on QldbDriver.
Before
let qldbDriver: QldbDriver = new QldbDriver(..);
let session: QldbSession = await qldbDriver.getSession();
let tableNames: String[] = await session.getTableNames();
After
let qldbDriver: QldbDriver = new QldbDriver(..);
let tableNames: String[] = await qldbDriver.getTableNames();
Use executeLambda
method on the driver
If you have been using executeLambda
method on a session instance, we recommend you to instead use the executeLambda
method on the driver instance. We have deprecated the executeLambda
method on the session instance and will remove it in future versions.
Before
let qldbDriver: QldbDriver = new QldbDriver(..);
let session: QldbSession = await qldbDriver.getSession();
session.executeLambda(..)
After
let qldbDriver: QldbDriver = new QldbDriver(..);
qldbDriver.executeLambda(..)