Releases: nodecosmos/charybdis
Releases · nodecosmos/charybdis
v0.7.8
v0.7.7
What's new:
- Added
project_root
option inMigrationBuilder
by @Michal-python - update: scylla v0.14.0 by @GoranBrkuljan
Breaking changes:
SerializeCql
is nowSerializeValue
execute
fn is replace with appropriateexecute_unpaged
,execute_iter
, orexecute_single_page
find_paged
no longer takesOption<Bytes>
butPagingState
from driver itself
Full Changelog: v0.7.5...v0.7.7
v0.7.5
What's new:
-
feat: Expose the charybdis-migrate package for programmatic control over migrations by @Michal-python in #47
use migrate::MigrationBuilder; let migration = MigrationBuilder::new() .keyspace("test") .drop_and_replace(true) .build(&session) .await; migration.run().await;
-
refactor: code formatting cleanup #47
-
update: DRY-up migration builder #48
New Contributors
- @Michal-python made their first contribution in #47
Full Changelog: v0.7.3...v0.7.5
v0.7.3
What's new:
- feat: add TLS support for charybdis-migrate
migrate --keyspace nodecosmos --host 127.0.1:9042 --ca ca.crt --cert client.crt --key client.key
v0.7.0
What's new - breaking change:
-
update: use owned value instead of ref for
find_by_pk
functions #39now if we have model:
#[charybdis_model( table_name = posts, partition_keys = [category_id], clustering_keys = [id], )] pub struct Post { pub category_id: Uuid, pub id: Uuid, pub content: Text, }
Instead of:
Post::find_by_partition_key_value(&(category_id,)).execute(db_session).await?; Post::find_by_primary_key_value(&(category_id, id)).execute(db_session).await?;
we do:
Post::find_by_partition_key_value((category_id,)).execute(db_session).await?; Post::find_by_primary_key_value((category_id, id)).execute(db_session).await?;
-
feat: add
find_by_partition_key_value_paged
let (post_res, paging_state) = Post::find_by_partition_key_value_paged((category_id,)) .page_size(10) .paging_state(None) .execute(db_session) .await?; let posts: Result<Vec<Post>, CharybdisError> = post_res.collect();
v0.6.2
What's new:
- feat: add push/pull if exists methods & constants to collection fields #37
Now for collection fields we get additional push/pull if exists constants and methods
#[charybdis_model(
table_name = users,
partition_keys = [id],
clustering_keys = []
)]
pub struct User {
id: Uuid,
tags: Set<Text>,
}
// constants
impl User {
const PUSH_TAGS_IF_EXISTS_QUERY: &'static str = "UPDATE users SET tags = tags + ? WHERE id = ? IF EXISTS";
const PULL_POST_IDS_IF_EXISTS_QUERY: &'static str = "UPDATE users SET post_ids = post_ids - ? WHERE id = ? IF EXISTS";
}
// methods
let user = User::new();
user.push_tags_if_exists(tags: HashSet<T>).execute(&session).await;
user.pull_tags_if_exists(tags: HashSet<T>).execute(&session).await;
v0.6.1
v0.6.0
What's new:
- update: scylladb driver version to v0.13.0 #32
- refactor: require Send + Sync for SerializeRowBox
- refactor: prevent potential collision with native 'new' methods in partial_models
Potential breaking changes:
- update: re-export from scylladb only types that are relevant for charybdis-macros & query options
v0.5.3
What's new
fix: Batch::chunked_statements
- correctly append raw statements to the batch
v0.5.2
What's new
fix: field order requirement - now struct fields don't have to be in the same order as they are in macro arguments