Bug fix:
- Fix the
queryFailedevent so it includes an error parameter.
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,
priamsupported 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 oldhelenusdriver config options to those compatible withcassandra-driver. Config options inpriamare 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
errorhandlers 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.
connectandclosemethods 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:
localDataCenteris now a required field incassandra-driverversion 4.
Features:
- Support a
localDataCenterconfig setting to use in the load balancing policy
Features:
- Updated
cassandra-driverto latest version, handle new data type coercion. Breaking Changes: - Removed
helenusdependency (deprecated in1.2.0).
- Added retry module from PR #47.
- Resolved #44 (issue with
USING TIMESTAMPon individual statementes within batch queries). - Fixed an issue with subtypes being dropped from collection type hints.
- Downgrade
helenuslibrary to an optional dependency.
- Fix issue with BOM marks inside of named queries.
- Update
cassandra-driverconnection error logging.
- Add emulated streaming support for
helenusdriver.
- Add streaming support with
Query.stream()ordb.cql()forcassandra-driver.
- Fix
keyspaceoption when using multiple instances. This is a breaking change if you relied on the undocumentedinstance.pools.defaultproperty being available.
- Attach cql to error objects generated by query execution.
- Add support for
routingIndexeswhen 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-cqlin favor ofcassandra-driver.
- Batch.execute no longer yields an error when the batch is empty.
- Simplified result set transformation for
node-cassandra-cqldrivers.
- Add isBatch and isQuery methods to base driver.
- Fix
resultTransformerbug when query generates an error.
- Fix
Batch.add()when given emptyBatchorQueryobjects.
- Remove github dependency via
priam-connection-cqlmodule. - Added versioning logic around
cqlVersionto use the appropriate driver.
- Coerce
timestamphinted parameters fornode-cassandra-cqltoDateobjects fromstringornumber.
Batch.add()can now take anArrayargument.
- 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
querymethod 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 aQueryorBatchargument.
- Added
Batch.addBatch()enhancements.
- Added
Batch.addBatch(),Query.params([Array]), anddriver.connect([Function]). - Updated internal file naming conventions.
- Updated to support
insert/updatestatements onmap<,>types.
- Updated consistency failover strategy. Added
EventEmitterinheritance.
- Add support for
COUNTERandUNLOGGEDbatch 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
objectdata types if auto-deserialization is required on specific fields, or usedeserializeJsonStringsoption 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