pub enum Value {
String(String),
Number(f64),
Bool(bool),
Null,
Array(Vec<Value>),
FloatArray(Vec<f32>),
RawSql(String),
}Expand description
Represents a value to bind in a WHERE clause
§Examples
use fraiseql_wire::operators::Value;
let _ = Value::String("John".to_string());
let _ = Value::Number(42.0);
let _ = Value::Bool(true);
let _ = Value::Null;
let _ = Value::Array(vec![Value::String("a".to_string()), Value::String("b".to_string())]);Variants§
String(String)
String value
Number(f64)
Numeric value (f64 can represent i64, u64, f32 with precision)
Bool(bool)
Boolean value
Null
NULL
Array(Vec<Value>)
Array of values (for IN operators)
FloatArray(Vec<f32>)
Vector of floats (for pgvector distance operators)
RawSql(String)
Raw SQL expression (use with caution!)
This should only be used for trusted SQL fragments, never for user input.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more