[−][src]Struct c3p0_pool_sqlite::rusqlite::Row
A single result row of a query.
Methods
impl<'stmt> Row<'stmt>
[src]
pub fn get_unwrap<I, T>(&self, idx: I) -> T where
I: RowIndex,
T: FromSql,
[src]
I: RowIndex,
T: FromSql,
Get the value of a particular column of the result row.
Failure
Panics if calling row.get(idx)
would return an error,
including:
- If the underlying SQLite column type is not a valid type as a source
for
T
- If the underlying SQLite integral value is outside the range
representable by
T
- If
idx
is outside the range of columns in the returned query
pub fn get<I, T>(&self, idx: I) -> Result<T, Error> where
I: RowIndex,
T: FromSql,
[src]
I: RowIndex,
T: FromSql,
Get the value of a particular column of the result row.
Failure
Returns an Error::InvalidColumnType
if the underlying SQLite column
type is not a valid type as a source for T
.
Returns an Error::InvalidColumnIndex
if idx
is outside the valid
column range for this row.
Returns an Error::InvalidColumnName
if idx
is not a valid column
name for this row.
If the result type is i128 (which requires the i128_blob
feature to be
enabled), and the underlying SQLite column is a blob whose size is not
16 bytes, Error::InvalidColumnType
will also be returned.
pub fn get_raw_checked<I>(&self, idx: I) -> Result<ValueRef, Error> where
I: RowIndex,
[src]
I: RowIndex,
Get the value of a particular column of the result row as a ValueRef
,
allowing data to be read out of a row without copying.
This ValueRef
is valid only as long as this Row, which is enforced by
it's lifetime. This means that while this method is completely safe,
it can be somewhat difficult to use, and most callers will be better
served by get
or get
.
Failure
Returns an Error::InvalidColumnIndex
if idx
is outside the valid
column range for this row.
Returns an Error::InvalidColumnName
if idx
is not a valid column
name for this row.
pub fn get_raw<I>(&self, idx: I) -> ValueRef where
I: RowIndex,
[src]
I: RowIndex,
Get the value of a particular column of the result row as a ValueRef
,
allowing data to be read out of a row without copying.
This ValueRef
is valid only as long as this Row, which is enforced by
it's lifetime. This means that while this method is completely safe,
it can be difficult to use, and most callers will be better served by
get
or get
.
Failure
Panics if calling row.get_raw_checked(idx)
would return an error,
including:
- If
idx
is outside the range of columns in the returned query. - If
idx
is not a valid column name for this row.
pub fn column_count(&self) -> usize
[src]
Return the number of columns in the current row.
Auto Trait Implementations
impl<'stmt> !Send for Row<'stmt>
impl<'stmt> Unpin for Row<'stmt>
impl<'stmt> !Sync for Row<'stmt>
impl<'stmt> !UnwindSafe for Row<'stmt>
impl<'stmt> !RefUnwindSafe for Row<'stmt>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,