Struct msi::Expr [] [src]

pub struct Expr { /* fields omitted */ }

An expression on database rows that can be used in queries.

Methods

impl Expr
[src]

Returns an expression that evaluates to the value of the specified column.

Returns an expression that evaluates to a null value.

Returns an expression that evaluates to the given boolean value.

Returns an expression that evaluates to the given integer value.

Returns an expression that evaluates to the given string value.

Returns an expression that evaluates to true if the two subexpressions evaluate to equal values.

Returns an expression that evaluates to true if the two subexpressions evaluate to unequal values.

Returns an expression that evaluates to true if the left-hand subexpression evaluates to a strictly lesser value than the right-hand subexpression.

Returns an expression that evaluates to true if the left-hand subexpression evaluates to a lesser-or-equal value than the right-hand subexpression.

Returns an expression that evaluates to true if the left-hand subexpression evaluates to a strictly greater value than the right-hand subexpression.

Returns an expression that evaluates to true if the left-hand subexpression evaluates to a greater-or-equal value than the right-hand subexpression.

Returns an expression that computes the bitwise inverse of the subexpression. If the subexpression evaluates to a non-number, the result will be a null value.

This method exists instead of the std::ops::Not trait to distinguish it from the (logical) not() method.

Returns an expression that evaluates to true if both subexpressions evaluate to true.

Returns an expression that evaluates to true if either subexpression evaluates to true.

Returns an expression that evaluates to true if the subexpression evaluates to false.

This method exists instead of the std::ops::Not trait to distinguish it from the (bitwise) bitinv() method.

Evaluates the expression against the given row. Any errors in the expression (such as dividing a number by zero, or applying a bitwise operator to a string) will result in a null value.

Returns the set of all column names referenced by this expression.

Trait Implementations

impl Neg for Expr
[src]

Produces an expression that evaluates to the negative of the subexpression. If the subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the - operator

The method for the unary - operator

impl Add for Expr
[src]

Produces an expression that evaluates to the sum of the two subexpressions (if they are integers) or concatenation (if they are strings). If the two subexpressions evaluate to different types, or if either evaluates to a null value, the result will be a null value.

The resulting type after applying the + operator

The method for the + operator

impl Sub for Expr
[src]

Produces an expression that evaluates to the difference of the two subexpressions. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the - operator

The method for the - operator

impl Mul for Expr
[src]

Produces an expression that evaluates to the product of the two subexpressions. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the * operator

The method for the * operator

impl Div for Expr
[src]

Produces an expression that evaluates to the integer quotient of the two subexpressions. If either subexpression evaluates to a non-number, or if the divisor evalulates to zero, the result will be a null value.

The resulting type after applying the / operator

The method for the / operator

impl BitAnd for Expr
[src]

Produces an expression that evaluates to the bitwise-and of the two subexpressions. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the & operator

The method for the & operator

impl BitOr for Expr
[src]

Produces an expression that evaluates to the bitwise-or of the two subexpressions. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the | operator

The method for the | operator

impl BitXor for Expr
[src]

Produces an expression that evaluates to the bitwise-xor of the two subexpressions. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the ^ operator

The method for the ^ operator

impl Shl<Expr> for Expr
[src]

Produces an expression that evaluates to the value of the left-hand subexpression bit-shifted left by the value of the right-hand subexpression. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the << operator

The method for the << operator

impl Shr<Expr> for Expr
[src]

Produces an expression that evaluates to the value of the left-hand subexpression bit-shifted right by the value of the right-hand subexpression. If either subexpression evaluates to a non-number, the result will be a null value.

The resulting type after applying the >> operator

The method for the >> operator

impl Display for Expr
[src]

Formats the value using the given formatter. Read more