Skip to main content

Module condition

Module condition 

Source
Expand description

Backend-specific condition wrappers and operation traits.

Conditions: Each wrapper (e.g., SqliteCondition) is a newtype around Expression<BackendType>. It accepts Expression<F> for any F: Into<BackendType>, plus common types (Identifier, Fx) via From.

Operations: Each backend gets a vendor-specific operation trait (e.g. SqliteOperation<T>) that produces the backend’s condition type directly. These are blanket-implemented for all Expressive<T> where T: Into<AnyType>, and the condition type implements Expressive<AnyType> to enable chaining:

use vantage_sql::sqlite::operation::SqliteOperation;
let price = Column::<i64>::new("price");
price.gt(10).eq(false)  // => SqliteCondition wrapping (price > 10) = 0

Structs§

SqliteCondition
Condition wrapper that preserves type inference for with_condition().

Functions§

build_sql_binary
Helper for define_sql_operation!: build a binary expression, map to the backend’s condition type. Public so the macro can call it from any module.