Trait sqlx_core_oldapi::value::ValueRef
source · pub trait ValueRef<'r>: Sized {
type Database: Database;
// Required methods
fn to_owned(&self) -> <Self::Database as Database>::Value;
fn type_info(&self) -> Cow<'_, <Self::Database as Database>::TypeInfo>;
fn is_null(&self) -> bool;
}Expand description
A reference to a single value from the database.
Required Associated Types§
Required Methods§
sourcefn to_owned(&self) -> <Self::Database as Database>::Value
fn to_owned(&self) -> <Self::Database as Database>::Value
Creates an owned value from this value reference.
This is just a reference increment in PostgreSQL and MySQL and thus is O(1). In SQLite,
this is a copy.
Object Safety§
This trait is not object safe.
Implementors§
source§impl ValueRef<'_> for MssqlValueRef<'_>
Available on crate feature mssql only.
impl ValueRef<'_> for MssqlValueRef<'_>
Available on crate feature
mssql only.source§impl<'r> ValueRef<'r> for MySqlValueRef<'r>
Available on crate feature mysql only.
impl<'r> ValueRef<'r> for MySqlValueRef<'r>
Available on crate feature
mysql only.source§impl<'r> ValueRef<'r> for PgValueRef<'r>
Available on crate feature postgres only.
impl<'r> ValueRef<'r> for PgValueRef<'r>
Available on crate feature
postgres only.