Open
Description
Example:
#[charybdis_model(
table_name = users,
partition_keys = [id],
clustering_keys = [],
)]
pub struct User {
id: Uuid,
#[charybdis_expr("WRITETIME(id)")]
id_writetime: Option<Timestamp>,
tags: Set<Text>,
post_ids: List<Uuid>,
}
id_writetime
will be a read-only field (ignored by insert()
and update()
)
SELECT queries will include WRITETIME(id)
and the column will be mapped to id_writetime
What do you think?