Precedence class Null safety

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

Implemented types

Properties

hashCode int
The hash code for this object. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

compareTo(Precedence other) int
Compares this object to another object. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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. [...]
override
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

and → const Precedence
Precedence for the AND operator in sql
Precedence._(11)
bitwise → const Precedence
Precedence for bitwise operators in sql
Precedence._(14)
comparison → const Precedence
Precedence for the <, <=, >, >= operators in sql
Precedence._(13)
comparisonEq → const Precedence
Precedence for most of the comparisons operators in sql, including equality, is (not) checks, in, like, glob, match, regexp.
Precedence._(12)
mulDivide → const Precedence
Precedence for the *, / and % operators in sql
Precedence._(16)
or → const Precedence
Precedence for the OR operator in sql
Precedence._(10)
plusMinus → const Precedence
Precedence for the (binary) plus and minus operators in sql
Precedence._(15)
postfix → const Precedence
Precedence for postfix operators (like collate) in sql
Precedence._(21)
primary → const Precedence
Highest precedence in sql, used for variables and literals.
Precedence._(100)
stringConcatenation → const Precedence
Precedence for the || operator in sql
Precedence._(17)
unary → const Precedence
Precedence for unary operators in sql
Precedence._(20)
unknown → const Precedence
Precedence is unknown, assume lowest. This can be used for a CustomExpression to always put parens around it.
Precedence._(-1)