power

Function power 

Source
pub fn power<'a, V, E1, E2>(
    base: E1,
    exponent: E2,
) -> SQLExpr<'a, V, Double, <E1::Nullable as NullOr<E2::Nullable>>::Output, Scalar>
where V: SQLParam + 'a, E1: Expr<'a, V>, E1::SQLType: Numeric, E2: Expr<'a, V>, E2::SQLType: Numeric, E1::Nullable: NullOr<E2::Nullable>, E2::Nullable: Nullability,
Expand description

POWER - raises a number to a power.

Returns Double type. The result is nullable if either input is nullable.

§Example

use drizzle_core::expr::power;

// SELECT POWER(users.base, 2)
let squared = power(users.base, 2);