Skip to content

Releases: nodecosmos/charybdis

v0.7.9

25 Nov 14:05
57df4ea
Compare
Choose a tag to compare

What's new:

  • update: scylla driver version to 0.15.0 and use new deserialization API by @GoranBrkuljan in #59

Full Changelog: v0.7.8...v0.7.9

v0.7.8

22 Oct 17:15
c9bf372
Compare
Choose a tag to compare

What's new:

  • feat: add find_all query #54
let users = User::find_all()
    .execute(&db_session)
    .await?
    .try_collect()
    .await?;

v0.7.7

07 Sep 09:05
4db1c81
Compare
Choose a tag to compare

What's new:

Breaking changes:

  • SerializeCql is now SerializeValue
  • execute fn is replace with appropriate execute_unpaged, execute_iter, or execute_single_page
  • find_paged no longer takes Option<Bytes> but PagingState from driver itself

Full Changelog: v0.7.5...v0.7.7

v0.7.5

20 Aug 14:56
Compare
Choose a tag to compare

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

Full Changelog: v0.7.3...v0.7.5

v0.7.3

16 Jul 12:25
Compare
Choose a tag to compare

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

12 Jun 16:46
dc3523f
Compare
Choose a tag to compare

What's new - breaking change:

  • update: use owned value instead of ref for find_by_pk functions #39

    now 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

05 Jun 14:10
efaa62f
Compare
Choose a tag to compare

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

30 May 13:13
Compare
Choose a tag to compare

What's new:

  • Panics if Tuple field is not Frozen<Tuple<T, T>> as it can cause migration to drop and recreate field a47be2a

v0.6.0

09 May 18:03
049c9a4
Compare
Choose a tag to compare

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

30 Apr 11:32
5b42809
Compare
Choose a tag to compare

What's new

fix: Batch::chunked_statements - correctly append raw statements to the batch