From 24d43fcf492cf387a37009bbe5d6cbd0416308ae 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 e1b6776..6db9c27 100644 --- a/src/context.rs +++ b/src/context.rs @@ -580,6 +580,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)),