Trait sqlx::ValueRef[][src]

pub trait ValueRef<'r> {
    type Database: Database;
    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.

Associated Types

Required methods

fn to_owned(&self) -> <Self::Database as Database>::Value[src]

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.

fn type_info(&self) -> Cow<'_, <Self::Database as Database>::TypeInfo>[src]

Get the type information for this value.

fn is_null(&self) -> bool[src]

Returns true if the SQL value is NULL.

Implementors

impl<'_, '_> ValueRef<'_> for MssqlValueRef<'_>[src]

type Database = Mssql

pub fn to_owned(&self) -> MssqlValue[src]

pub fn type_info(&self) -> Cow<'_, MssqlTypeInfo>[src]

pub fn is_null(&self) -> bool[src]

impl<'r> ValueRef<'r> for AnyValueRef<'r>[src]

type Database = Any

pub fn to_owned(&self) -> AnyValue[src]

pub fn type_info(&self) -> Cow<'_, AnyTypeInfo>[src]

pub fn is_null(&self) -> bool[src]

impl<'r> ValueRef<'r> for MySqlValueRef<'r>[src]

type Database = MySql

pub fn to_owned(&self) -> MySqlValue[src]

pub fn type_info(&self) -> Cow<'_, MySqlTypeInfo>[src]

pub fn is_null(&self) -> bool[src]

impl<'r> ValueRef<'r> for PgValueRef<'r>[src]

type Database = Postgres

pub fn to_owned(&self) -> PgValue[src]

pub fn type_info(&self) -> Cow<'_, PgTypeInfo>[src]

pub fn is_null(&self) -> bool[src]

impl<'r> ValueRef<'r> for SqliteValueRef<'r>[src]

type Database = Sqlite

pub fn to_owned(&self) -> SqliteValue[src]

pub fn type_info(&self) -> Cow<'_, SqliteTypeInfo>[src]

pub fn is_null(&self) -> bool[src]