From 1e4db8339952c72a646a78954705a8638230b76f Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Thu, 27 Jun 2024 22:28:47 +0300 Subject: [PATCH] Add 'ColumnType::Timestamp' support for the prepared statements --- src/context.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/context.rs b/src/context.rs index c1c318f..2a61fbd 100644 --- a/src/context.rs +++ b/src/context.rs @@ -622,6 +622,9 @@ mod bind { } (Value::Integer(v), ColumnType::Int) => convert_int(*v, ColumnType::Int, CqlValue::Int), (Value::Integer(v), ColumnType::BigInt) => Ok(CqlValue::BigInt(*v)), + (Value::Integer(v), ColumnType::Timestamp) => { + Ok(CqlValue::Timestamp(scylla::frame::value::CqlTimestamp(*v))) + } (Value::Float(v), ColumnType::Float) => Ok(CqlValue::Float(*v as f32)), (Value::Float(v), ColumnType::Double) => Ok(CqlValue::Double(*v)),