Changelog
June 18, 2024 ยท View on GitHub
All notable changes to this project will be documented in this file.
This file's format is based on Keep a Changelog
and this project adheres to Semantic Versioning. The
version number is tracked in the file VERSION.
Unreleased
Added
Changed
Fixed
3.0.2 - 2024-06-18
Changed
- Update repo location from Metaswitch/cassandra-rs to cassandra-rs/cassandra-rs, and update maintainer's affiliation.
3.0.1 - 2024-02-29
Fixed
- Expose
Row::iter(which was inadvertently made private in 3.0.0).
3.0.0 - 2024-02-28
Added
get_decimal()now gets a Cassanda decimal value asBigDecimal,bind_decimal()does the reverse.
Changed
- Date type is now
u32.
Fixed
- Soundness issue fixed - the various iterators no longer implement
std::iter::Iterator, but instead a newLendingIteratortrait. For migration guide, seeREADME. - Many types now take a lifetime argument, e.g.,
Valueis nowValue<'a>,ResultIteratoris nowResultIterator<'a>. RowIteratorno longer implementsDisplay(since it would consume the iterator); howeverRowdoes.Result::into_iter()andRow::into_iter()are now bothiter(), since they do not consume their argument.TupleIteratoris removed - it was never used, since you use the set iterator (Value::get_set()) for lists, sets, and tuples.ConstDataType::sub_data_by_nameandConstDataType::sub_type_namenow take&selfrather than an explicit argument.FunctionMeta::argumentnow returns the name and type, rather than just().- The underlying raw pointer is no longer exposed as a field of
Cluster,ResultIterator, andRowIterator. - Many types now implement
Syncas well asSend.
2.0.1 - 2023-06-08
Fixed
- Fix bug where
connect_keyspacewas notSend - Fixed some rustc and clippy warnings.
2.0.0 - 2023-03-13
Changed
- All functions were converted to be asynchronous. This allows for better performance, as asynchronous functions can run in parallel and make better use of system resources.
- The macro
stmt!was changed from a macro to a function, namedstatement. This change fundamentally alters how the API is used and was made to provide a more intuitive and clear interface for users. - The wait function was replaced with await from the tokio runtime. This change was made to take advantage of the asynchronous capabilities of the tokio runtime, allowing for better performance and scalability in Cassandra operations.
Fixed
- The main development branch is now
mainnotmaster. To track this, fetch and then check outmain.
1.2.0 - 2022-11-14
Added
- Added
unset_logger,set_slog_logger(behindslogfeature) andset_log_logger(behindlogfeature) - Expose
set_resolve_timeoutfunction. - Expose
set_exponential_reconnectfunction.
Changed
set_loggeris deprecated and behindslogfeature which is enabled by default
Fixed
- Inet::Default now returns an ipv4 address of 0.0.0.0 instead of the previous value which was semantically incorrect.
1.1.0 - 2022-03-31
Added
- Added new
early_access_min_tls_versionfeature, which enables aset_min_protocol_versionmethod on anSslobject.
1.0.0 - 2022-03-29
Added
- Added new
set_cloud_secure_connection_bundleandset_cloud_secure_connection_bundle_no_ssl_lib_initfunctions using the functions Datastax defined in cassandra-cpp-driver version 2.16.0. - Added new error codes
LIB_NO_TRACING_IDandSSL_CLOSEDusing the codes Datastax defined in cassandra-cpp-driver version 2.16.0.
0.17.2 - 2022-03-09
Fixed
- Fixed UB in
Inet::to_string
0.17.1 - 2022-01-24
Changed
- Move GitHub build to GitHub Actions (was previously Travis).
Fixed
- Removed unused
decimaldependency.
0.17.0 - 2021-05-17
Changed
-
Changed
Session::execute_batchandSession::execute_batch_with_payloadsto take only a reference toBatchrather than consuming it.This is a breaking change; to update your code, simply change
batchto&batchin your argument list. If this causes an errorfuture cannot be sent between threads safelybecause&Batchisused across an await, you need to introduce aletbefore theawaitas follows:let fut = session.execute_batch(&batch); let result = fut.await?
0.16.0 - 2021-03-10
Added
- Exposes separate setters for collection types on
TupleandUserType. As such, the respectiveset_collectionandset_collection_by_nameon both types have been removed.set_collectionbecomesset_setandset_collection_by_namebecomesset_set_by_name. - Added
Cluster::set_token_aware_routing_shuffle_replicas. ConstDataType::new_user_typehas been added, to allow the creation of a user data type from an existing data type.- Added
Session::execute_with_payloadsandSession::execute_batch_with_payloadsto allow getting custom payloads from query and batch executions.
Breaking changes
- Extended the lifetime of a
CassResultinto aRow. This is a breaking change, and may require reworking the code to satisfy the lifetime requirement that theCassResultmust live longer than theRow. CassCollection::newhas been renamed toCassCollection::with_capacity, andCassCollection::newhas been created, that no longer requires a capacity. This closely mirrors the API that the standard library collections expose, and that theitem_countpassed tonewis merely a capacity hint for the purpose of optimization.time::Durationhas been replaced withstd::time::Duration.
Changed
- Change various functions to avoid the extra overhead using an intermediate CString object.
- Switched to using
parking_lot::Mutexinstead ofstd::sync::MutexforCassFuturecoordination. - Implemented
size_hintonResultIterator. - Bumped versions of various dependencies.
Fixed
CassResult::set_paging_state_tokenwas implemented incorrectly, namely, it did nothing, and has instead been replaced withCassResult::paging_state_token.Statement::set_paging_state_tokenhas been changed to take a&[u8]instead of a&str, as a paging state token isn't necessarily utf8 encoded.
0.15.1 - 2020-06-02
Added
- Conversion functions between
uuid::Uuidand this library'sUuid.
Changed
PreparedStatementis now consideredSync, and can be shared across threads.
Fixed
- Remove unnecessary
build.rs, making it easier to build the crate.
0.15.0 - 2020-01-28
Changed
- Drop support for futures 0.1, and implement
std::futureinstead, allowing you to use this this library insideasyncfunctions, allowing anything that returns aCassFutureto beawaited. This is a breaking change, and will require you to update your call-sites to either usestd::future, or wrap them with a compatibility shim (e.g.,futures::compat).
Added
- Adds a new method,
Cluster.connect_asyncthat returns a future, allowing you to connect to the cluster without blocking the event loop.
[0.14.1] - 2019-11-07
Changed
- Add code example for SSL.
- Updated error-chain to 0.12.1 to avoid
Errordeprecation warnings.
Fixed
- Provide missing doc comment, fix unused doc comment warnings.
- Fix type signature on
set_load_balance_dc_awareso it can be used.
0.14.0 - 2019-01-22
Added
Clone,CopyandPartialEqtraits inInet- Fields name and value support for
UserTypeIterator(support for UDT) - Extra bindings for
Row::get_by_nameandStatement::bind_by_name
Changed
Debugimplementation forInetnow uses itsToStringimplementation
Fixed
Value::get_inetwhich would always return a zeroedInet- Dropping futures early could cause a segfault when using the system allocator (in Rust 1.32.0 or later).
0.13.2 - 2019-01-15
- Avoid possible segfaults, by returning
Nonewhere possible, otherwise panicking. In particular, a collection field set to NULL now returnsNonerather than faulting. - Make
SchemaMeta::get_keyspace_by_namework (fix string handling bug). - Allow using the
SetIteratorfor lists and tuples. Previously these could not be enumerated at all! - For convenience, support
bind()forLists.
0.13.1 - 2019-01-08
- Fix
stmt!()not working ifStatementwas not imported.
0.13.0 - 2018-12-04
- Added new set_local_address function using the function Datastax added in cassandra-cpp-driver version 2.10.0
0.12.0 - 2018-12-04
Fixed
- No longer leaks all
CassResults.
Changed
- Updated cassandra-cpp-sys to 0.12.
- Updated cassandra-cpp-driver to 2.10.0
- cql protocol version 2 is no longer supported.
- Breaking changes: The Cassandra WriteType UKNOWN is now called UNKNOWN There is a new Cassandra error code LIB_EXECUTION_PROFILE_INVALID There is a new Cassandra value type: DURATION
ResultIteratornow has a lifetime parameter. The underlyingCassResultmust live for at least as long as the iterator.CassResultis no longerIntoIterator; instead&CassResultis. You must change code likefor row in resulttofor row in &resultand ensureresultlives long enough.
0.11.0 - 2018-04-26
- Remove the
AsInetandFromInettraits, replacing them with suitable implementations ofFrom. - Fixed buggy IPv6 conversions.
Inet::cass_inet_init_v4andInet::cass_inet_init_v6no longer consume their arguments.Tuple::set_inet()now takes anIpAddrrather than aSocketAddr.- Added wrapper for
cass_statement_set_request_timeout.
0.10.2 - 2017-09-11
-
Move to latest (0.11) version of
cassandra-cpp-syscrate.There should be no external impact.
0.10.1 - 2017-08-30
- Remove unnecessary dependency on
ipcrate. - Add
Copy,Clone,Hashimpls for all nullary enums. - Specify correct
SendandSyncmarkers for all C* types.
0.10.0 - 2017-08-03
The API changed significantly in version 0.10. Here is a summary of the main changes.
(Version 0.9 was skipped, for consistency with the cassandra-cpp-sys version number.)
Errors:
- The internal module
errorsand the underlyingcassandra-cpp-syscrate are no longer exposed in the API. All necessary types are defined in this crate's root module. - All errors are now reported consistently using a single newly-defined
Errortype.- The crate makes every effort to return an error rather than panicking.
CassError,CassErrorResult, and others are replaced byErrorandCassErrorCode.- Several return types have changed from
TtoResult<T, Error>.
Futures:
- There is only a single future type,
CassFuture, and it implements the Rust/Tokio futures API. It interoperates smoothly with existing futures code.Future,CloseFuture,ResultFuture,PreparedFuture,SessionFutureare all subsumed.waitis replaced withFuture::wait; other methods have standard analogues as well. See the futures documentation for details.- Callbacks can no longer be set explicitly on a future; instead the normal
futures mechanisms (e.g.,
and_then) should be used.
Values:
- The
Columntype is retired; instead useValue. - Some
Valuegetters have new names for consistency, e.g.,get_fltandget_dblare nowget_f32andget_f64respectively. Value::get_stringnow gets aString, not a&str; you can get a&strwithget_str.- The "magic" auto-converting
Rowgettersget_colandget_col_by_nameare renamed togetandget_by_namerespectively. This is to avoid confusion withget_column, which is something else entirely (it gets aValuefrom aRow). - Values have a new
is_nullmethod to allow retrieving null values. - UUIDs now support
EqandOrd.
Miscellaneous types:
- Several types which wrapped
cassandra-cpp-systypes now have enums of their own, complete with implementations ofDebug,Eq,PartialEq,Display, andFromStr. This includesBatchType,CassErrorCode,Consistency,LogLevel,SslVerifyFlag, andValueType. CqlProtocolis now simply an alias for an integer.- Contact points are now expressed as a simple string in the driver's preferred format.
ContactPointsis retired.
Other:
- Logging uses the
slogcrate. It is no longer possible to set your own logging callback, but you can set thesloglogger. - Internally, the code is cleaner and smaller and some tests have been added.
0.8.2 - 2017-06-29
First release of https://github.com/Metaswitch/cassandra-rs
- Fork package.
- Move examples to examples directory, then make several into Rust tests.
- Resolve all warnings.
- Fix various panics.
- Add
EqandOrdforUuid. - Add
is_nullsupport.
0.8.1 - 2016-12-13
Last release of https://github.com/tupshin/cassandra-rs