Releases: GoranBrkuljan/charybdis
Releases · GoranBrkuljan/charybdis
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
v0.7.13
What's Changed
- update: add methods to read query string in #70
- feature: column type override by @johnny-smitherson in #72
- feature: add find_model_rule helper to materialized views by @GoranBrkuljan in #73
- fix: allow multiple views in the same file in #73
Full Changelog: v0.7.11...v0.7.13
v0.7.11
What's Changed
- migrations should ignore
targetdir - migrations should run from current directory and not try to lookup for flies in ancestor directories
- add owned values to batch
- add example for actix web
Full Changelog: v0.7.10...v0.7.11
v0.7.10
What's Changed
- feat: Add migrate as feature of charybdis by @theelderbeever in #62
use charybdis::migrate::MigrationBuilder;
- update: scylla version & address new compiler warnings by @GoranBrkuljan in #64
- update: re-export scylla from lib to ensure version consistency between the driver and the ORM
New Contributors
- @theelderbeever made their first contribution in #62
Full Changelog: v0.7.9...v0.7.10