Skip to content

Releases

v1.2.2

Choose a tag to compare

@goshi-goruma goshi-goruma released this 02 Dec 16:33
acc66fd

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

Choose a tag to compare

@goshi-goruma goshi-goruma released this 01 Dec 09:11
5c0893e

What's Changed

  • fix: ambiguous serialize call in Varint by @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 of Varint (#88)
  • scylla/serde, because of Counter, Duration and Timeuuid (#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

Choose a tag to compare

@goshi-goruma goshi-goruma released this 14 Nov 13:26
d516ae5

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 syn 3 and darling 0.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: a Varchar column was seen as a changed type on every run. With --drop-and-replace the column was dropped and created again, losing its data; without it the migration panicked.
  • migrate: CLUSTERING ORDER BY or COMPACT STORAGE as the last entry of table_options produced an invalid ALTER TABLE statement on every run after the first.
  • CharybdisError::source() returned None for BatchError and TypeCheckError.

Upgrade notes

  • Rust 1.94+ is required.
  • Varint is no longer an i64.
  • 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 --ca and 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, 9043 and 9044 on localhost), list a single contact point and let the driver discover the rest. Otherwise most sessions fail with ConnectionRefused.

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

Choose a tag to compare

@goshi-goruma goshi-goruma released this 19 Nov 21:38

What's Changed

  • feature: implement find_by_fields_paged in #86
  • update: remove limits for maximum for generated find_by_fields functions 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

Choose a tag to compare

@goshi-goruma goshi-goruma released this 10 Nov 19:52
b2a93ee

What's Changed

  • update: scylla-driver version to 1.4 by @GoranBrkuljan in #85

v1.0.3

Choose a tag to compare

@goshi-goruma goshi-goruma released this 04 Sep 07:25

What's Changed

v1.0.2

Choose a tag to compare

@goshi-goruma goshi-goruma released this 03 Jun 11:25

What's Changed

update: scylla driver version to 1.2.0 #83
update: add load_balancing_policy query option #83

v1.0.1

Choose a tag to compare

@goshi-goruma goshi-goruma released this 19 Apr 12:22

What's Changed

update: scylla driver version to 1.1.0: f84ce83

v1.0.0

Choose a tag to compare

@goshi-goruma goshi-goruma released this 28 Mar 10:09
77a0027

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::CachingSession is now scylla::client::caching_session::CachingSession
  • scylla::statement::{PagingState, PagingStateResponse}; has moved to scylla::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

Choose a tag to compare

@goshi-goruma goshi-goruma released this 03 Mar 14:10

What's Changed

New Contributors

Full Changelog: v0.7.13...v0.7.14