pub struct Column { /* private fields */ }
Expand description
A single value returned from a query.
SQLite automatically converts between data types on request, which is why many of the
methods require &mut
.
Implementations§
Source§impl Column
impl Column
Sourcepub fn name(&self) -> Result<&str>
pub fn name(&self) -> Result<&str>
Returns the value of the AS clause for this column, if one was specified. If no AS clause was specified, the name of the column is unspecified and may change from one release of SQLite to the next.
Sourcepub fn database_name(&self) -> Result<Option<&str>>
pub fn database_name(&self) -> Result<Option<&str>>
Returns the original, unaliased name of the database that is the origin of this column.
Sourcepub fn table_name(&self) -> Result<Option<&str>>
pub fn table_name(&self) -> Result<Option<&str>>
Returns the original, unaliased name of the table that is the origin of this column.
Sourcepub fn origin_name(&self) -> Result<Option<&str>>
pub fn origin_name(&self) -> Result<Option<&str>>
Returns the original, unaliased name of the column that is the origin of this column.
Trait Implementations§
Source§impl FromValue for Column
impl FromValue for Column
Source§fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Returns the data type of the ValueRef. Note that calling get methods on the
ValueRef may cause a conversion to a different data type, but this is not
guaranteed.
Source§fn is_null(&self) -> bool
fn is_null(&self) -> bool
Convenience method equivalent to
self.value_type() == ValueType::Null
.Source§fn try_get_blob(&self) -> Result<&[u8]>
fn try_get_blob(&self) -> Result<&[u8]>
Attempt to interpret this value as a BLOB, without converting. If the underlying
data type is not a BLOB, this function will fail with Err(SQLITE_MISMATCH).
Source§fn try_get_str(&self) -> Result<&str>
fn try_get_str(&self) -> Result<&str>
Attempt to interpret this value as TEXT, without converting. If the underlying data
type is not TEXT, this function will fail with Err(SQLITE_MISMATCH). This
function can also fail if the string has invalid UTF-8.
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl !Send for Column
impl !Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
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