Features:
- Expose more details in the emitted events, like the Cassandra clients (a.k.a. "pools") themselves
This major release is geared toward internal performance improvements and removing some legacy code cruft relating to the now-defunct dual driver support.
BREAKING:
- Priam now requires node 10.17 or node 12.3 or greater so it can take advantage of async iterator support. For some reason, node 11 is incompatible.
- In olden days,
priam
supported two underlying Cassandra drivers. This is no-longer the case, so some effort has been done to remove the cruft in the code for this dual support. One of these changes removes the translation of the oldhelenus
driver config options to those compatible withcassandra-driver
. Config options inpriam
are now aligned directly with the config options ofcassandra-driver
. - Errors are now emitted correctly when writing to a stream. This means you may now need to attach
error
handlers to your streams to avoid unhandled error exceptions. - Undocumented private methods have now been prefixed with underscores; if your code was calling these undocumented methods directly, those methods may now have been renamed or removed.
- Some cases where error would be emitted through streams or callbacks have been changed to throw immediately in the case of caller error. For example, passing a named query that does not exist will throw immediately to the caller.
Features:
- Query methods now all support callbacks, Promises, stream writing, and async iterators options.
connect
andclose
methods now support Promises- All query result options use retry mechanisms; before the stream option did not.
Performance:
- Streaming functionality has been streamlined; native node streams are now used instead of third-party wrappers, and the number of intermediate streams wrappers have been reduced. You may now use the async iterable options to avoid even more node streaming overhead.
See the migration from 3.x to 4.x to assist your efforts into migrating to version 4.x.
- Error objects will now return query metadata, including parameters. In production environments, it is recommended that the parameter values be excluded from logs.
Features:
localDataCenter
is now a required field incassandra-driver
version 4.
Features:
- Support a
localDataCenter
config setting to use in the load balancing policy
Features:
- Updated
cassandra-driver
to latest version, handle new data type coercion. Breaking Changes: - Removed
helenus
dependency (deprecated in1.2.0
).
- Added retry module from PR #47.
- Resolved #44 (issue with
USING TIMESTAMP
on individual statementes within batch queries). - Fixed an issue with subtypes being dropped from collection type hints.
- Downgrade
helenus
library to an optional dependency.
- Fix issue with BOM marks inside of named queries.
- Update
cassandra-driver
connection error logging.
- Add emulated streaming support for
helenus
driver.
- Add streaming support with
Query.stream()
ordb.cql()
forcassandra-driver
.
- Fix
keyspace
option when using multiple instances. This is a breaking change if you relied on the undocumentedinstance.pools.default
property being available.
- Attach cql to error objects generated by query execution.
- Add support for
routingIndexes
when usingTokenAwarePolicy
.
- Add better error handling for
cassandra-driver
.
- Strip schema metadata from result sets over binary protocol v1.
- Adjust stringify for numeric bigint values.
- Fix parameterized queries over binary protocol v1.
- Dependency updates.
- Removed
node-cassandra-cql
in favor ofcassandra-driver
.
- Batch.execute no longer yields an error when the batch is empty.
- Simplified result set transformation for
node-cassandra-cql
drivers.
- Add isBatch and isQuery methods to base driver.
- Fix
resultTransformer
bug when query generates an error.
- Fix
Batch.add()
when given emptyBatch
orQuery
objects.
- Remove github dependency via
priam-connection-cql
module. - Added versioning logic around
cqlVersion
to use the appropriate driver.
- Coerce
timestamp
hinted parameters fornode-cassandra-cql
toDate
objects fromstring
ornumber
.
Batch.add()
can now take anArray
argument.
- Fix usage of
Batch.addBatch()
in pre-2.0 Cassandra environments that do not support DML-level timestamps.
- Fixed bug where
Query.single()
andQuery.first()
would return empty array instead of null on empty result sets.
- Fixed bug which caused boolean values to not be returned when their value is false
- Fixed bug which caused resultTransformers to not execute
- Changed config to look up consistency level enum if given a string
- Added resultTransformers to drivers and queries-- synchronous functions that are mapped over query results
- Query consistency is set to driver's at instantiation, rather than being looked up at execution if not present
- Added
query
method to base driver, alias forcql
- Modified
Batch.execute()
to send timestamps as parameters instead of CQL strings.
- Added
Query.single()
,Query.first()
, andQuery.all()
enhancements.
- Added generalized
Batch.add()
that can take aQuery
orBatch
argument.
- Added
Batch.addBatch()
enhancements.
- Added
Batch.addBatch()
,Query.params([Array])
, anddriver.connect([Function])
. - Updated internal file naming conventions.
- Updated to support
insert
/update
statements onmap<,>
types.
- Updated consistency failover strategy. Added
EventEmitter
inheritance.
- Add support for
COUNTER
andUNLOGGED
batch types.
- Dependency bump.
- Revert back to Promises v1.
- Update to latest version of Promises (q.js).
- Potential breaking change - JSON is no longer auto-deserialized. See the Executing CQL section for more information. Use
object
data types if auto-deserialization is required on specific fields, or usedeserializeJsonStrings
option to detect JSON as 0.6.x and prior did.
- Dependency bump.
- Bugfixes.
- Added batching support.
- Added fluent syntax.
- Updated example to include setup script.
- Added
#param()
helper method for hinted parameters.
- Dependency updates, test Travis CI hooks.
- Initial Public Release