Trait tidb_query_aggr::summable::Summable[][src]

pub trait Summable: Evaluable + EvaluableRet {
    fn zero() -> Self;
fn add_assign(&mut self, ctx: &mut EvalContext, other: &Self) -> Result<()>;
fn add(&self, other: &Self) -> Result<Self>;
fn sub(&self, other: &Self) -> Result<Self>;
fn mul(&self, other: &Self) -> Result<Self>;
fn div(&self, other: &Self) -> Result<Self>;
fn from_usize(val: usize) -> Result<Self>; }

A trait for all summable types.

This trait is used to implement AVG() and SUM() by using generics.

Required methods

fn zero() -> Self[src]

Returns the zero value.

fn add_assign(&mut self, ctx: &mut EvalContext, other: &Self) -> Result<()>[src]

Adds assign another value.

fn add(&self, other: &Self) -> Result<Self>[src]

fn sub(&self, other: &Self) -> Result<Self>[src]

fn mul(&self, other: &Self) -> Result<Self>[src]

fn div(&self, other: &Self) -> Result<Self>[src]

fn from_usize(val: usize) -> Result<Self>[src]

Loading content...

Implementations on Foreign Types

impl Summable for Decimal[src]

impl Summable for Real[src]

Loading content...

Implementors

Loading content...