Repository navigation
Releases
v1.2.2
What's Changed
- Benchmark against the ScyllaDB driver alone, and prepare batch statements once; version 1.2.2 by @goshi-goruma in #90
Fixes
A batch was prepared again on every execution: the driver cloned it and looked up each of its statements in the cache of prepared statements. A batch now looks up each distinct statement once, and executes as prepared. For batches of 100 rows, the time that Charybdis adds went from 6–14% to within the noise.
Benchmark
charybdis-bench runs every operation of Charybdis next to the same operation written with the ScyllaDB driver alone. In general, the difference is noise: see Performance.
The API did not change, so 1.2.2 can replace 1.2.1 as is.
Full Changelog: v1.2.1...v1.2.2
v1.2.1
What's Changed
- fix: ambiguous
serializecall inVarintby @ramikg in #88 - fix: ambiguous serialize and deserialize calls with scylla's serde feature; version 1.2.1 by @goshi-goruma in #89
Fixes
1.2.0 did not compile in a project where another dependency turns on one of these features:
num-bigint/serde, because ofVarint(#88)scylla/serde, because ofCounter,DurationandTimeuuid(#89)
The error was E0034: multiple applicable items in scope in charybdis/src/types.rs. Nothing else changed, so 1.2.1 can replace 1.2.0 as is.
New Contributors
Full Changelog: v1.2.0...v1.2.1
v1.2.0
What's Changed
- update: scylla-driver version 1.10, Rust 2024 edition, fixes and tests by @GoranBrkuljan in #87
Driver and Rust
- ScyllaDB Rust driver 1.10 (was 1.4) and the Rust 2024 edition. Rust 1.94 or newer is now required, because the driver requires it.
- All other dependencies are on their latest versions, including
syn3 anddarling0.24. The code generated by the macros is unchanged.
Varint
Varint was an alias of i64 and could not be used with a varint column. It is now an integer of any size:
use charybdis::types::Varint;
let small = Varint::from(42);
let big: Varint = "123456789012345678901234567890".parse()?;Like Decimal, it is written to JSON as a string and read from a string or a whole number. The underlying num_bigint::BigInt is available as .0.
Fixes
migrate: aVarcharcolumn was seen as a changed type on every run. With--drop-and-replacethe column was dropped and created again, losing its data; without it the migration panicked.migrate:CLUSTERING ORDER BYorCOMPACT STORAGEas the last entry oftable_optionsproduced an invalidALTER TABLEstatement on every run after the first.CharybdisError::source()returnedNoneforBatchErrorandTypeCheckError.
Upgrade notes
- Rust 1.94+ is required.
Varintis no longer ani64.- TLS: since driver 1.5, the certificate of a node has to list the node's IP address in its SAN, otherwise the connection is rejected. This applies to
migrate --caand to sessions you build yourself. - Contact points: since driver 1.6, every node is expected to listen on the port of the contact point that was used. If your nodes are published on different host ports (for example docker with
9042,9043and9044on localhost), list a single contact point and let the driver discover the rest. Otherwise most sessions fail withConnectionRefused.
Tests
Integration tests went from 10 to 30, and there are now 67 unit tests that run without a database.
Full Changelog: v1.1.0...v1.2.0
v1.1.0
What's Changed
- feature: implement
find_by_fields_pagedin #86 - update: remove limits for maximum for generated
find_by_fieldsfunctions by @GoranBrkuljan in #86
Now we have generated find_by_fields functions for all primary key fields, and we have find_by_fields_paged variant that we can use like this:
#[charybdis_model(
table_name = posts,
partition_keys = [date],
clustering_keys = [category_id, title],
global_secondary_indexes = [category_id],
local_secondary_indexes = [title]
)]
pub struct Post {
pub date: Date,
pub category_id: Uuid,
pub title: Text,
}
// paged finders over partition key + clustering keys
let (paged_posts_iter, paging_state) = Post::find_by_date_and_category_id_paged(date, category_id)
.page_size(10)
.execute(db_session)
.await?;
let paged_posts = paged_posts_iter.collect::<Result<Vec<Post>, CharybdisError>>()?;
if let PagingStateResponse::HasMorePages { state } = paging_state {
let (next_page_iter, next_state) = Post::find_by_date_and_category_id_paged(date, category_id)
.paging_state(state)
.page_size(10)
.execute(db_session)
.await?;
let _next_posts = next_page_iter.collect::<Result<Vec<Post>, CharybdisError>>()?;
assert!(matches!(next_state, PagingStateResponse::NoMorePages));
}Full Changelog: v1.0.4...v1.1.0
v1.0.4
What's Changed
- update: scylla-driver version to 1.4 by @GoranBrkuljan in #85
v1.0.3
What's Changed
- Bump scylla dep to 1.3 by @theelderbeever in #84
- fix(lint): mismatched-lifetime-syntaxes a2afd1d
v1.0.2
v1.0.1
v1.0.0
What's Changed
- update: scylla driver to 1.0.0 #81
Just as Scylla's driver, Charybdis ORM is now considered as API-stable.
Breaking changes:
The ORM itself does not introduce any breaking API changes. However, most changes stem from the driver’s reorganized dependencies. For example:
scylla::CachingSessionis nowscylla::client::caching_session::CachingSessionscylla::statement::{PagingState, PagingStateResponse};has moved toscylla::response::{PagingState, PagingStateResponse}
For the full list of driver-related breaking changes, see the Scylla Rust Driver v1.0.0 release notes.
v0.7.14
What's Changed
- migration: accept code schema from user by @gabriel-v in #79
New Contributors
- @gabriel-v made their first contribution in #79
Full Changelog: v0.7.13...v0.7.14