Closed fruch closed 7 months ago
a snippet from what I've tried
pub async fn prepare(db) {
db.load_cycle_count = 100;
db.prepare(INSERT, `INSERT INTO ${KEYSPACE}.${TABLE}(id, channel_id, bucket, webhook) VALUES (:id, :channel_id, :bucket, :webhook)`).await?;
db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE id = :id AND channel_id = :channel_id AND bucket = :bucket`).await?;
}
pub async fn load(db, i) {
let message_webhook = #{};
message_webhook["id"] = 123;
message_webhook["username"] = "fruch";
db.execute_prepared(INSERT, [latte::hash(i), latte::hash(i+100), latte::hash(i+200).to_i32(), message_webhook]).await?
}
Rust driver can read/write UDTs: https://rust-driver.docs.scylladb.com/stable/data-types/udt.html
but seems that using it from latte workload is not currently possible
passing in Rune object didn't worked:
I'm guessing some constructs needs to be expose to Rune, for building needed UDT objects