charybdis

Rust ORM for ScyllaDB and Apache Cassandra

MIT License

Downloads
85.2K
Stars
115

Bot releases are visible (Hide)

charybdis - v0.4.5

Published by GoranBrkuljan 7 months ago

What's new

let user = User::new();
user.maybe_find_by_primary_key().execute(db_session).await -> Result<Option<Model>, CharybdisError>
charybdis - v0.4.4

Published by GoranBrkuljan 8 months ago

charybdis - v0.4.3

Published by GoranBrkuljan 8 months ago

What's new

  • local_secondary_indexes are now defined as list of fields. Partition key is derived from partition_keys part of macro declaration and each element in array will result with new local index so now we just do:
    #[charybdis_model(
        table_name = menus,
        partition_keys = [location],
        clustering_keys = [name, price, dish_type],
        global_secondary_indexes = [],
        local_secondary_indexes = [dish_type]
    )]
    
charybdis - v0.4.1

Published by GoranBrkuljan 8 months ago

What's new

  • updated docs
  • fix: ignore non .rs files in charybdis-migrate
charybdis - v0.4.0

Published by GoranBrkuljan 8 months ago

Features

What's new (Breaking changes)

  1. All Operations: find, insert, update, delete now return CharybdisQuery that can be configured before execution.

    let user = user.find_by_primary_key().consistency(Consistency::One).execute(session);
    
  2. Macro generated operations also return CharybdisQuery so instead of:

    User::find_by_id(session, id).await?;
    

    we have configurable:

    User::find_by_id(id).consistency(Consistency::All).execute(db_sesison).await?;
    
  3. Callbacks: We now have only single Callbacks trait that is used for all operation that can accept extension.
    In case extension is not needed, we can use blank ().

  4. Batch Operations: Batch is now coupled with Model and it's created by calling Model::batch() method. It
    can also be configured before execution.

    let batch = User::batch().consistency(Consistency::One).chunked_insert(&session, users, 100).await?;
    
  5. Counter: Now we have macro-generated increment_<field_name> and decrement_<field_name> model methods to update counter fields.

charybdis - v0.3.1

Published by GoranBrkuljan 8 months ago

What's Changed

New Contributors

charybdis - v0.3.0

Published by GoranBrkuljan 9 months ago

What's Changed

  • Migration to new driver's Scylla Rust Driver serialization API
  • Introduced --drop-and-replace flag in migrate so one can drop and replace column on type change
Package Rankings
Badges
Extracted from project README
Crates.io License Docs.rs Discord
Related Projects