pub enum SqlxRow {
Postgres(PgRow),
}Expand description
A generic row wrapper that works across databases.
Variants§
Implementations§
Source§impl SqlxRow
impl SqlxRow
Sourcepub fn backend(&self) -> DatabaseBackend
pub fn backend(&self) -> DatabaseBackend
Get the database backend type.
Sourcepub fn get<T>(&self, index: usize) -> SqlxResult<T>where
T: SqlxDecode,
pub fn get<T>(&self, index: usize) -> SqlxResult<T>where
T: SqlxDecode,
Get a column value by index.
Sourcepub fn get_by_name<T>(&self, name: &str) -> SqlxResult<T>where
T: SqlxDecodeNamed,
pub fn get_by_name<T>(&self, name: &str) -> SqlxResult<T>where
T: SqlxDecodeNamed,
Get a column value by name.
Sourcepub fn try_get<T>(&self, index: usize) -> SqlxResult<Option<T>>where
T: SqlxDecode,
pub fn try_get<T>(&self, index: usize) -> SqlxResult<Option<T>>where
T: SqlxDecode,
Try to get a nullable column value by index.
Sourcepub fn to_json(&self) -> SqlxResult<JsonValue>
pub fn to_json(&self) -> SqlxResult<JsonValue>
Convert the row to a JSON value.
Auto Trait Implementations§
impl !Freeze for SqlxRow
impl RefUnwindSafe for SqlxRow
impl Send for SqlxRow
impl Sync for SqlxRow
impl Unpin for SqlxRow
impl UnwindSafe for SqlxRow
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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