Trait mentat_db::db::TypedSQLValue [] [src]

pub trait TypedSQLValue {
    fn from_sql_value_pair(
        value: Value,
        value_type_tag: i32
    ) -> Result<TypedValue>;
fn to_sql_value_pair<'a>(&'a self) -> (ToSqlOutput<'a>, i32);
fn from_edn_value(value: &Value) -> Option<TypedValue>;
fn to_edn_value_pair(&self) -> (Value, ValueType); }

Required Methods

Implementations on Foreign Types

impl TypedSQLValue for TypedValue
[src]

[src]

Given a SQLite value and a value_type_tag, return the corresponding TypedValue.

[src]

Given an EDN value, return a corresponding Mentat TypedValue.

An EDN Value does not encode a unique Mentat ValueType, so the composition from_edn_value(first(to_edn_value_pair(...))) loses information. Additionally, there are EDN values which are not Mentat typed values.

This function is deterministic.

[src]

Return the corresponding SQLite value and value_type_tag pair.

[src]

Return the corresponding EDN value and value_type pair.

Implementors