final class StatementParts
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Resolves the target, join and branch spans of a MERGE statement.

Methods§

public function target(
    string $sql,
    string $statementSql,
    list<SqlToken> $tokens,
): array{name: string, sql: string, alias: string, using: SqlToken}
public function join(
    string $sql,
    string $statementSql,
    list<SqlToken> $tokens,
    SqlToken $usingToken,
): array{source: string, condition: string, when: list<SqlToken>}

Separates the source relation and join condition before the first branch.

Parameters

$sqlstring
$statementSqlstring
$tokenslist<SqlToken>
$usingTokenSqlToken

Returns

array{source: string, condition: string, when: list<SqlToken>}
Test cases 1
Called from 1
Calls 7
public function clauses(
    string $sql,
    string $statementSql,
    list<SqlToken> $whenTokens,
): non-empty-list<PgSqlMergeClause>

Parses every WHEN branch using its exact source offsets.

Parameters

$sqlstring
$statementSqlstring
$whenTokenslist<SqlToken>

Returns

non-empty-list<PgSqlMergeClause>
Test cases 1
Called from 1
Calls 5

Test cases 13§

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

Dedicated tests 3
Other tests reaching this symbol 10

Relations§

Instantiated in 1
Method calls 3