pub struct Row { /* private fields */ }Expand description
A single row returned by a catalog query, keyed by column name.
Implementations§
Source§impl Row
impl Row
Sourcepub fn get_value(
&self,
query: CatalogQuery,
key: &str,
) -> Result<&Value, CatalogError>
pub fn get_value( &self, query: CatalogQuery, key: &str, ) -> Result<&Value, CatalogError>
Borrow a column value by name.
Sourcepub fn get_int(
&self,
query: CatalogQuery,
key: &str,
) -> Result<i64, CatalogError>
pub fn get_int( &self, query: CatalogQuery, key: &str, ) -> Result<i64, CatalogError>
Read a non-null integer column (any width).
Sourcepub fn get_opt_int(
&self,
query: CatalogQuery,
key: &str,
) -> Result<Option<i64>, CatalogError>
pub fn get_opt_int( &self, query: CatalogQuery, key: &str, ) -> Result<Option<i64>, CatalogError>
Read an optional integer column.
Sourcepub fn get_text(
&self,
query: CatalogQuery,
key: &str,
) -> Result<String, CatalogError>
pub fn get_text( &self, query: CatalogQuery, key: &str, ) -> Result<String, CatalogError>
Read a non-null text column.
Sourcepub fn get_opt_text(
&self,
query: CatalogQuery,
key: &str,
) -> Result<Option<String>, CatalogError>
pub fn get_opt_text( &self, query: CatalogQuery, key: &str, ) -> Result<Option<String>, CatalogError>
Read an optional text column.
Sourcepub fn get_bool(
&self,
query: CatalogQuery,
key: &str,
) -> Result<bool, CatalogError>
pub fn get_bool( &self, query: CatalogQuery, key: &str, ) -> Result<bool, CatalogError>
Read a non-null bool column.
Sourcepub fn get_char(
&self,
query: CatalogQuery,
key: &str,
) -> Result<char, CatalogError>
pub fn get_char( &self, query: CatalogQuery, key: &str, ) -> Result<char, CatalogError>
Read a non-null char column (e.g., pg_constraint.contype).
Sourcepub fn get_int_array(
&self,
query: CatalogQuery,
key: &str,
) -> Result<Vec<i64>, CatalogError>
pub fn get_int_array( &self, query: CatalogQuery, key: &str, ) -> Result<Vec<i64>, CatalogError>
Read a non-null int2[]/int4[]/int8[] column.
Sourcepub fn get_text_array(
&self,
query: CatalogQuery,
key: &str,
) -> Result<Vec<String>, CatalogError>
pub fn get_text_array( &self, query: CatalogQuery, key: &str, ) -> Result<Vec<String>, CatalogError>
Read a non-null text[]/name[] column.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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