Skip to main content

ArithmeticOutput

Trait ArithmeticOutput 

Source
pub trait ArithmeticOutput<Rhs: Numeric = Self, Op = ArithmeticOp>: Numeric {
    type Output: Numeric;
    type Nullability: ArithmeticNullability;
}
Expand description

Maps a pair of numeric SQL types and an operator to the result SQL type.

The output follows SQL’s type promotion rules: narrower types widen to wider types (e.g. Int2 + Int8 → Int8, Int4 + Float8 → Float8). Dialects whose output varies by operator, such as MySQL integer division, implement only the corresponding operator marker.

Required Associated Types§

Source

type Output: Numeric

The resulting SQL type of the arithmetic expression.

Source

type Nullability: ArithmeticNullability

Whether the operator itself can introduce NULL.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ArithmeticOutput for Any

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Float4

Source§

type Output = Float4

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Float8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Int2

Source§

type Output = Int2

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Int4

Source§

type Output = Int4

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Int8

Source§

type Output = Int8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Integer

Source§

type Output = Integer

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for drizzle_types::sqlite::types::Numeric

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for drizzle_types::postgres::types::Numeric

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput for Real

Source§

type Output = Real

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Any> for Integer

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Any> for drizzle_types::sqlite::types::Numeric

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Any> for Real

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float4> for Float8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float4> for Int2

Source§

type Output = Float4

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float4> for Int4

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float4> for Int8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float4> for drizzle_types::postgres::types::Numeric

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float8> for Float4

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float8> for Int2

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float8> for Int4

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float8> for Int8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Float8> for drizzle_types::postgres::types::Numeric

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int2> for Float4

Source§

type Output = Float4

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int2> for Float8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int2> for Int4

Source§

type Output = Int4

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int2> for Int8

Source§

type Output = Int8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int2> for drizzle_types::postgres::types::Numeric

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int4> for Float4

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int4> for Float8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int4> for Int2

Source§

type Output = Int4

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int4> for Int8

Source§

type Output = Int8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int4> for drizzle_types::postgres::types::Numeric

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int8> for Float4

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int8> for Float8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int8> for Int2

Source§

type Output = Int8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int8> for Int4

Source§

type Output = Int8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Int8> for drizzle_types::postgres::types::Numeric

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Integer> for Any

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Integer> for drizzle_types::sqlite::types::Numeric

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Integer> for Real

Source§

type Output = Real

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Any

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Float4

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Float8

Source§

type Output = Float8

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Int2

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Int4

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Int8

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Integer

Source§

type Output = Numeric

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Numeric> for Real

Source§

type Output = Real

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Real> for Any

Source§

type Output = Any

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Real> for Integer

Source§

type Output = Real

Source§

type Nullability = PropagateNullability

Source§

impl ArithmeticOutput<Real> for drizzle_types::sqlite::types::Numeric

Source§

type Output = Real

Source§

type Nullability = PropagateNullability