[][src]Trait sqlx::arguments::Arguments

pub trait Arguments: 'static + Default + Send {
    type Database: Database + ?Sized;
    fn len(&self) -> usize;
fn size(&self) -> usize;
fn reserve(&mut self, len: usize, size: usize);
fn add<T>(&mut self, value: T)
    where
        T: Encode<Self::Database>,
        Self::Database: HasSqlType<T>
; fn is_empty(&self) -> bool { ... } }

A tuple of arguments to be sent to the database.

Associated Types

Loading content...

Required methods

fn len(&self) -> usize

Returns the number of values.

fn size(&self) -> usize

Returns the size of the arguments, in bytes.

fn reserve(&mut self, len: usize, size: usize)

Reserves the capacity for at least len more values (of size bytes) to be added to the arguments without a reallocation.

fn add<T>(&mut self, value: T) where
    T: Encode<Self::Database>,
    Self::Database: HasSqlType<T>, 

Add the value to the end of the arguments.

Loading content...

Provided methods

fn is_empty(&self) -> bool

Returns true if there are no values.

Loading content...

Implementors

impl Arguments for MySqlArguments[src]

type Database = MySql

impl Arguments for PgArguments[src]

type Database = Postgres

Loading content...