[−][src]Struct concatsql::Row
A single result row of a query.
Implementations
impl Row
[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_names(&self) -> Vec<&str>
[src]
Get all the column names.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnwindSafe for Row
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>,