final class Trailer
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\Query". Code outside that scope must not name this declaration.

The clauses written after a query during lowering: ORDER BY, LIMIT, PROCEDURE ANALYSE, a trailing INTO and the locking clauses.

A lowering-time value: it collects the clauses until the query they belong to is known (MYSQL-SELECT-001) and is never part of a model.

Properties§

public list<OrderItem> $orderBy = []
public Limit|null $limit = null
public ProcedureAnalyse|null $procedure = null
public list<LockingClause> $locking = []
public IntoDestination|null $into = null
public IntoPosition|null $intoPosition = null

Methods§

public function __construct(
    public list<OrderItem> $orderBy = [],
    public Limit|null $limit = null,
    public ProcedureAnalyse|null $procedure = null,
    public list<LockingClause> $locking = [],
    public IntoDestination|null $into = null,
    public IntoPosition|null $intoPosition = null,
)

Parameters

$orderBylist<OrderItem>The ORDER BY items
$limitLimit|nullThe LIMIT clause
$procedureProcedureAnalyse|nullThe PROCEDURE ANALYSE clause
$lockinglist<LockingClause>The locking clauses
$intoIntoDestination|nullThe trailing INTO destination
$intoPositionIntoPosition|nullWhere the trailing INTO is written
public function then(self $later): self

Combines these clauses with the ones written after them around the same query.

Locking clauses accumulate in written order. A clause the server accepts only once is refused.

Parameters

$laterself

Returns

self

Throws

AnalysisException When ORDER BY, INTO or PROCEDURE ANALYSE is written twice, which no grammar derives and the server rejects while parsing (ER_SYNTAX_ERROR)
ImplementationGap When LIMIT is written twice, where the 5.6 server lets the later one replace the earlier
Test cases 3
Called from 4
Calls 5
public function wrap(Query $query): Query

Test cases 23§

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

Dedicated tests 6
Other tests reaching this symbol 17

Relations§

Instantiated in 30
Method calls 11
Type declarations 9