Precedence enum

Used to order the precedence of sql expressions so that we can avoid unnecessary parens when generating sql statements.

Inheritance
Implemented types
Available extensions

Values

unknown → const Precedence

Precedence is unknown, assume lowest. This can be used for a CustomExpression to always put parens around it.

const Precedence._(-1)
or → const Precedence

Precedence for the OR operator in sql

const Precedence._(10)
and → const Precedence

Precedence for the AND operator in sql

const Precedence._(11)
comparisonEq → const Precedence

Precedence for most of the comparisons operators in sql, including equality, is (not) checks, in, like, glob, match, regexp.

const Precedence._(12)
comparison → const Precedence

Precedence for the <, <=, >, >= operators in sql

const Precedence._(13)
bitwise → const Precedence

Precedence for bitwise operators in sql

const Precedence._(14)
plusMinus → const Precedence

Precedence for the (binary) plus and minus operators in sql

const Precedence._(15)
mulDivide → const Precedence

Precedence for the *, / and % operators in sql

const Precedence._(16)
stringConcatenation → const Precedence

Precedence for the || operator in sql

const Precedence._(17)
unary → const Precedence

Precedence for unary operators in sql

const Precedence._(20)
postfix → const Precedence

Precedence for postfix operators (like collate) in sql

const Precedence._(21)
primary → const Precedence

Highest precedence in sql, used for variables and literals.

const Precedence._(100)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(Precedence other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator <(Precedence other) bool
Returns true if this Precedence is lower than other.
operator <=(Precedence other) bool
Returns true if this Precedence is lower or equal to other.
operator ==(Object other) bool
The equality operator.
inherited
operator >(Precedence other) bool
Returns true if this Precedence is higher than other.
operator >=(Precedence other) bool
Returns true if this Precedence is higher or equal to other.

Constants

values → const List<Precedence>
A constant List of the values in this enum, in order of their declaration.