This is struct use for insert and select data. But SerializeValue given me
{ user_id: 45b5b8f7-4b5e-4df6-aedc-74327fba0ad5, first_name: “Jane”, last_name: “Smith”, email: “janesmith_example.com”, phone: Some(“234-567-8901”), address: Some(“456 Oak St, Townsville”), shipping_address: Some(“101 E-Commerce St, Townsville”), date_of_birth: Some(CqlDate(2147489452)), passwordv: “hashed_password_2”, salt: “random_salt_2”, role: Some(“seller”), is_active: true, last_login: CqlTimestamp(1729076400000), created_at: CqlTimestamp(1727254800000), updated_at: CqlTimestamp(1729078200000) }
How can i get values only?
use scylla::{
frame::value::{CqlDate, CqlTimestamp},
FromRow, SerializeRow, SerializeValue,
};
use uuid::Uuid;#[derive(Debug, SerializeRow, FromRow, SerializeValue)]
pub struct User {
pub user_id: Uuid,
pub first_name: String,
pub last_name: String,
pub email: String,
pub phone: Option,
pub address: Option,
pub shipping_address: Option,
pub date_of_birth: Option,
pub passwordv: String,
pub salt: String,
pub role: Option,
pub is_active: bool,
pub last_login: CqlTimestamp,
pub created_at: CqlTimestamp,
pub updated_at: CqlTimestamp,
}