final class Precedence
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". Code outside that scope must not name this declaration.

Decides whether an operand keeps its place when an operator expression is written without parentheses.

Rule: SQLITE-PRECEDENCE-001. The binding levels are those of the SQLite grammar, weakest first: OR; AND; NOT; the equality group (=, ==, <>, !=, IS, LIKE, GLOB, REGEXP, MATCH, BETWEEN, IN, ISNULL, NOTNULL, NOT NULL); the ordering comparisons; ESCAPE; the bitwise group; + and -; *, / and %; || and the JSON extraction operators; COLLATE; the prefix operators ~, + and -. Binary operators group to the left. An operand written on the left of an operator keeps its place when no expression on its right edge binds weaker than the operator; an operand written on the right keeps its place when every expression on its left edge binds tighter. A prefix operator on the right edge takes every tighter operator that follows it. Terminates: each walk follows one edge of a finite tree. Source: https://sqlite.org/lang_expr.html#operators_and_parse_affecting_attributes. Status: Implemented.

Constants§

public const DISJUNCTION = 1

The level of OR.

public const CONJUNCTION = 2

The level of AND.

public const NEGATION = 3

The level of the prefix NOT.

public const EQUALITY = 4

The level of the equality group.

public const COMPARISON = 5

The level of the ordering comparisons.

public const ESCAPE = 6

The level of ESCAPE.

public const BITWISE = 7

The level of the bitwise operators.

public const ADDITIVE = 8

The level of binary plus and minus.

public const MULTIPLICATIVE = 9

The level of multiplication, division and remainder.

public const CONCATENATION = 10

The level of concatenation and JSON extraction.

public const COLLATION = 11

The level of COLLATE.

public const PREFIX = 12

The level of the prefix operators other than NOT.

public const CLOSED = 99

The level of an expression that is closed on the asked edge.

Methods§

public function closing(Scalar $operand): int

Answers the weakest level among the expressions on the right edge of an operand.

Parameters

$operandScalar

Returns

int
Test cases 1
Called from 9
Calls 3
public function takesEscape(Scalar $operand): bool

Tells whether a pattern match without ESCAPE lies on the right edge of an operand, where it would take a following ESCAPE.

Parameters

$operandScalar

Returns

bool
Test cases 1
Called from 1
Calls 1

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 7
Other tests reaching this symbol 1

Relations§

Instantiated in 9
Method calls 16
Constant reads 29