[−][src]Struct concatsql::Row
A single result row of a query.
Implementations
impl<'a> Row<'a>
[src]
pub fn get<T: Get>(&self, key: T) -> Option<&str>
[src]
Get the value of a column of the result row.
Examples
for row in &conn.rows("SELECT 1").unwrap() { assert_eq!(row.get(0).unwrap(), "1"); assert_eq!(row.get("1").unwrap(), "1"); }
pub fn get_into<T: Get, U: FromSql>(&self, key: T) -> Result<U, Error>
[src]
Transforms and gets the columns of the result row.
⚠️ If column is NULL then execute U::from_str("")
.
Examples
for row in &conn.rows("SELECT 1").unwrap() { assert_eq!(row.get_into::<_, i32>(0).unwrap(), 1); assert_eq!(row.get_into::<_, i32>("1").unwrap(), 1); assert_eq!(row.get_into::<_, String>(0).unwrap(), "1"); assert_eq!(row.get_into::<_, String>("1").unwrap(), "1"); let one: u8 = row.get_into(0).unwrap(); assert_eq!(one, 1u8); }
pub fn column_count(&self) -> usize
[src]
Return the number of columns.
pub fn is_empty(&self) -> bool
[src]
Determines if there are any values in the row.
pub fn column_name<T: Get>(&self, key: T) -> Option<&str>
[src]
Get the column name.
pub fn column_names(&self) -> Vec<&str>
[src]
Get all the column names.
Trait Implementations
impl<'a> Debug for Row<'a>
[src]
impl<'a> PartialEq<Row<'a>> for Row<'a>
[src]
impl<'a> StructuralPartialEq for Row<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Row<'a>
impl<'a> Send for Row<'a>
impl<'a> Sync for Row<'a>
impl<'a> Unpin for Row<'a>
impl<'a> UnwindSafe for Row<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,