Skip to main content

ColumnValue

Trait ColumnValue 

Source
pub trait ColumnValue: Send + Sync {
    // Required methods
    fn to_sql_value(&self) -> Value;
    fn column_type(&self) -> &'static str;
}
Expand description

Value that can be stored in a SQLite vector store document column.

Use serde_json::Value for columns declared as JSON.

Required Methods§

Source

fn to_sql_value(&self) -> Value

Converts this value to a typed SQLite value.

Source

fn column_type(&self) -> &'static str

Returns the SQLite type name for this value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ColumnValue for String

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Source§

impl ColumnValue for Value

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Source§

impl ColumnValue for bool

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Source§

impl ColumnValue for f32

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Source§

impl ColumnValue for f64

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Source§

impl ColumnValue for i32

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Source§

impl ColumnValue for i64

Source§

fn to_sql_value(&self) -> Value

Source§

fn column_type(&self) -> &'static str

Implementors§