Duration
is represented as CqlDuration
\
use scylla::IntoTypedRows;
use scylla::frame::value::CqlDuration;
// Insert some ip address into the table
let to_insert: CqlDuration = CqlDuration { months: 1, days: 2, nanoseconds: 3 };
session
.query("INSERT INTO keyspace.table (a) VALUES(?)", (to_insert,))
.await?;
// Read inet from the table
if let Some(rows) = session.query("SELECT a FROM keyspace.table", &[]).await?.rows {
for row in rows.into_typed::<(CqlDuration,)>() {
let (cql_duration,): (CqlDuration,) = row?;
}
}