pub enum ColumnAffinity {
Text,
Integer,
Real,
Blob,
Numeric,
}
Expand description
A columns “affinity”. https://www.sqlite.org/datatype3.html#type_affinity
Variants§
Text
“char”, “clob”, or “text”
Integer
“int”
Real
“real”, “floa”, or “doub”
Blob
“blob” or empty
Numeric
else, no other matches
Implementations§
Source§impl ColumnAffinity
impl ColumnAffinity
Sourcepub fn from_declared_type(declared_type: &str) -> Self
pub fn from_declared_type(declared_type: &str) -> Self
Determines a column’s affinity based on its declared typed, from https://www.sqlite.org/datatype3.html#determination_of_column_affinity
Sourcepub fn result_text(
&self,
context: *mut sqlite3_context,
value: &str,
) -> Result<()>
pub fn result_text( &self, context: *mut sqlite3_context, value: &str, ) -> Result<()>
Result the given value on the given sqlite3_context, while applying the proper affinity rules. It may instead result as an i32, i64, or f64 numberor default back to just text.
Auto Trait Implementations§
impl Freeze for ColumnAffinity
impl RefUnwindSafe for ColumnAffinity
impl Send for ColumnAffinity
impl Sync for ColumnAffinity
impl Unpin for ColumnAffinity
impl UnwindSafe for ColumnAffinity
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