Trait sqlx::ValueRef[][src]

pub trait ValueRef<'r> {
    type Database: Database;
    pub fn to_owned(&self) -> <Self::Database as Database>::Value;
pub fn type_info(&self) -> Cow<'_, <Self::Database as Database>::TypeInfo>;
pub fn is_null(&self) -> bool; }

A reference to a single value from the database.

Associated Types

Loading content...

Required methods

pub 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.

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

Get the type information for this value.

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

Returns true if the SQL value is NULL.

Loading content...

Implementors

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

type Database = Mssql

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

type Database = Any

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

type Database = MySql

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

type Database = Postgres

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

type Database = Sqlite

Loading content...