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
.
1.1.0 - 2022-03-31
- Added new
early_access_min_tls_version
feature, which enables aset_min_protocol_version
method on anSsl
object.
1.0.0 - 2022-03-29
- Added new
set_cloud_secure_connection_bundle
andset_cloud_secure_connection_bundle_no_ssl_lib_init
functions using the functions Datastax defined in cassandra-cpp-driver version 2.16.0. - Added new error codes
LIB_NO_TRACING_ID
andSSL_CLOSED
using the codes Datastax defined in cassandra-cpp-driver version 2.16.0.
0.17.2 - 2022-03-09
- Fixed UB in
Inet::to_string
0.17.1 - 2022-01-24
- Move GitHub build to GitHub Actions (was previously Travis).
- Removed unused
decimal
dependency.
0.17.0 - 2021-05-17
-
Changed
Session::execute_batch
andSession::execute_batch_with_payloads
to take only a reference toBatch
rather than consuming it.This is a breaking change; to update your code, simply change
batch
to&batch
in your argument list. If this causes an errorfuture cannot be sent between threads safely
because&Batch
isused across an await
, you need to introduce alet
before theawait
as follows:let fut = session.execute_batch(&batch); let result = fut.await?
0.16.0 - 2021-03-10
- Exposes separate setters for collection types on
Tuple
andUserType
. As such, the respectiveset_collection
andset_collection_by_name
on both types have been removed.set_collection
becomesset_set
andset_collection_by_name
becomesset_set_by_name
. - Added
Cluster::set_token_aware_routing_shuffle_replicas
. ConstDataType::new_user_type
has been added, to allow the creation of a user data type from an existing data type.- Added
Session::execute_with_payloads
andSession::execute_batch_with_payloads
to allow getting custom payloads from query and batch executions.
- Extended the lifetime of a
CassResult
into aRow
. This is a breaking change, and may require reworking the code to satisfy the lifetime requirement that theCassResult
must live longer than theRow
. CassCollection::new
has been renamed toCassCollection::with_capacity
, andCassCollection::new
has been created, that no longer requires a capacity. This closely mirrors the API that the standard library collections expose, and that theitem_count
passed tonew
is merely a capacity hint for the purpose of optimization.time::Duration
has been replaced withstd::time::Duration
.
- Change various functions to avoid the extra overhead using an intermediate CString object.
- Switched to using
parking_lot::Mutex
instead ofstd::sync::Mutex
forCassFuture
coordination. - Implemented
size_hint
onResultIterator
. - Bumped versions of various dependencies.
CassResult::set_paging_state_token
was implemented incorrectly, namely, it did nothing, and has instead been replaced withCassResult::paging_state_token
.Statement::set_paging_state_token
has 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
- Conversion functions between
uuid::Uuid
and this library'sUuid
.
PreparedStatement
is now consideredSync
, and can be shared across threads.
- Remove unnecessary
build.rs
, making it easier to build the crate.
0.15.0 - 2020-01-28
- Drop support for futures 0.1, and implement
std::future
instead, allowing you to use this this library insideasync
functions, allowing anything that returns aCassFuture
to beawait
ed. 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
).
- Adds a new method,
Cluster.connect_async
that returns a future, allowing you to connect to the cluster without blocking the event loop.
- Add code example for SSL.
- Updated error-chain to 0.12.1 to avoid
Error
deprecation warnings.
- Provide missing doc comment, fix unused doc comment warnings.
- Fix type signature on
set_load_balance_dc_aware
so it can be used.
0.14.0 - 2019-01-22
Clone
,Copy
andPartialEq
traits inInet
- Fields name and value support for
UserTypeIterator
(support for UDT) - Extra bindings for
Row::get_by_name
andStatement::bind_by_name
Debug
implementation forInet
now uses itsToString
implementation
Value::get_inet
which 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
None
where possible, otherwise panicking. In particular, a collection field set to NULL now returnsNone
rather than faulting. - Make
SchemaMeta::get_keyspace_by_name
work (fix string handling bug). - Allow using the
SetIterator
for lists and tuples. Previously these could not be enumerated at all! - For convenience, support
bind()
forList
s.
0.13.1 - 2019-01-08
- Fix
stmt!()
not working ifStatement
was 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
- No longer leaks all
CassResult
s.
- 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
ResultIterator
now has a lifetime parameter. The underlyingCassResult
must live for at least as long as the iterator.CassResult
is no longerIntoIterator
; instead&CassResult
is. You must change code likefor row in result
tofor row in &result
and ensureresult
lives long enough.
0.11.0 - 2018-04-26
- Remove the
AsInet
andFromInet
traits, replacing them with suitable implementations ofFrom
. - Fixed buggy IPv6 conversions.
Inet::cass_inet_init_v4
andInet::cass_inet_init_v6
no longer consume their arguments.Tuple::set_inet()
now takes anIpAddr
rather 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-sys
crate.There should be no external impact.
0.10.1 - 2017-08-30
- Remove unnecessary dependency on
ip
crate. - Add
Copy
,Clone
,Hash
impls for all nullary enums. - Specify correct
Send
andSync
markers 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
errors
and the underlyingcassandra-cpp-sys
crate 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
Error
type.- The crate makes every effort to return an error rather than panicking.
CassError
,CassErrorResult
, and others are replaced byError
andCassErrorCode
.- Several return types have changed from
T
toResult<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
,SessionFuture
are all subsumed.wait
is 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
Column
type is retired; instead useValue
. - Some
Value
getters have new names for consistency, e.g.,get_flt
andget_dbl
are nowget_f32
andget_f64
respectively. Value::get_string
now gets aString
, not a&str
; you can get a&str
withget_str
.- The "magic" auto-converting
Row
gettersget_col
andget_col_by_name
are renamed toget
andget_by_name
respectively. This is to avoid confusion withget_column
, which is something else entirely (it gets aValue
from aRow
). - Values have a new
is_null
method to allow retrieving null values. - UUIDs now support
Eq
andOrd
.
Miscellaneous types:
- Several types which wrapped
cassandra-cpp-sys
types now have enums of their own, complete with implementations ofDebug
,Eq
,PartialEq
,Display
, andFromStr
. This includesBatchType
,CassErrorCode
,Consistency
,LogLevel
,SslVerifyFlag
, andValueType
. CqlProtocol
is now simply an alias for an integer.- Contact points are now expressed as a simple string in the driver's preferred format.
ContactPoints
is retired.
Other:
- Logging uses the
slog
crate. It is no longer possible to set your own logging callback, but you can set theslog
logger. - 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
Eq
andOrd
forUuid
. - Add
is_null
support.
0.8.1 - 2016-12-13
Last release of https://github.com/tupshin/cassandra-rs