OdbcValueRef

Struct OdbcValueRef 

Source
pub struct OdbcValueRef<'r> { /* private fields */ }
Available on crate feature odbc only.

Implementationsยง

Sourceยง

impl<'r> OdbcValueRef<'r>

Utility methods for OdbcValueRef

Source

pub fn new( batch: &'r OdbcBatch, row_index: usize, column_index: usize, ) -> OdbcValueRef<'r>

Create a new OdbcValueRef from batch, row index, and column index

Source

pub fn get_raw(&self) -> Option<OdbcValueType>

Get the raw value from the column data

Source

pub fn int<T>(&self) -> Option<T>
where T: TryFromInt,

Try to get the value as i64

Source

pub fn try_int<T>(&self) -> Result<T, Error>
where T: TryFromInt + Type<Odbc>,

Source

pub fn try_float<T>(&self) -> Result<T, Error>
where T: TryFromFloat + Type<Odbc>,

Source

pub fn float<T>(&self) -> Option<T>
where T: TryFromFloat,

Try to get the value as f64

Source

pub fn text(&self) -> Option<&'r str>

Try to get the value as string slice

Source

pub fn blob(&self) -> Option<&'r [u8]>

Try to get the value as binary slice

Source

pub fn date(&self) -> Option<Date>

Try to get the raw ODBC Date value

Source

pub fn time(&self) -> Option<Time>

Try to get the raw ODBC Time value

Source

pub fn timestamp(&self) -> Option<Timestamp>

Try to get the raw ODBC Timestamp value

Trait Implementationsยง

Sourceยง

impl<'r> Debug for OdbcValueRef<'r>

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Sourceยง

impl<'r> From<OdbcValueRef<'r>> for AnyValueRef<'r>

Sourceยง

fn from(value: OdbcValueRef<'r>) -> AnyValueRef<'r>

Converts to this type from the input type.
Sourceยง

impl<'r> ValueRef<'r> for OdbcValueRef<'r>

Sourceยง

type Database = Odbc

Sourceยง

fn to_owned(&self) -> OdbcValue

Creates an owned value from this value reference. Read more
Sourceยง

fn type_info(&self) -> Cow<'_, OdbcTypeInfo>

Get the type information for this value.
Sourceยง

fn is_null(&self) -> bool

Returns true if the SQL value is NULL.

Auto Trait Implementationsยง

ยง

impl<'r> Freeze for OdbcValueRef<'r>

ยง

impl<'r> RefUnwindSafe for OdbcValueRef<'r>

ยง

impl<'r> Send for OdbcValueRef<'r>

ยง

impl<'r> Sync for OdbcValueRef<'r>

ยง

impl<'r> Unpin for OdbcValueRef<'r>

ยง

impl<'r> UnwindSafe for OdbcValueRef<'r>

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ“˜
where F: FnOnce(&Self) -> bool,

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 more
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,