pub enum SqliteValue {
Text(String),
Integer(i64),
Real(f64),
Blob(Vec<u8>),
Jsonb(Value),
Null,
}Expand description
SQLite value wrapper for type mapping
Variants§
Text(String)
TEXT type for strings
Integer(i64)
INTEGER type for small integers
Real(f64)
REAL type for floating point
Blob(Vec<u8>)
BLOB type for binary data
Jsonb(Value)
JSONB type for JSON (stored as BLOB, queried via -> operator) Note: SQLite JSONB is different from PostgreSQL JSONB but provides similar benefits: pre-parsed binary format for faster queries.
Null
NULL
Implementations§
Source§impl SqliteValue
impl SqliteValue
Sourcepub fn sqlite_type(&self) -> &'static str
pub fn sqlite_type(&self) -> &'static str
Get the SQLite type name for column creation
Sourcepub fn is_jsonb(&self) -> bool
pub fn is_jsonb(&self) -> bool
Check if this value is a JSONB type that needs special SQL handling
Sourcepub fn as_json_string(&self) -> Option<String>
pub fn as_json_string(&self) -> Option<String>
Get the JSON string representation (for use with jsonb() function)
Trait Implementations§
Source§impl Clone for SqliteValue
impl Clone for SqliteValue
Source§fn clone(&self) -> SqliteValue
fn clone(&self) -> SqliteValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SqliteValue
impl Debug for SqliteValue
Source§impl From<Value> for SqliteValue
impl From<Value> for SqliteValue
Auto Trait Implementations§
impl Freeze for SqliteValue
impl RefUnwindSafe for SqliteValue
impl Send for SqliteValue
impl Sync for SqliteValue
impl Unpin for SqliteValue
impl UnsafeUnpin for SqliteValue
impl UnwindSafe for SqliteValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.