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

Laravel identifier wrapping and ordered SQL fragments for the selected grammar.

Constants§

public const EXPRESSION = 'Illuminate\Database\Query\Expression'

The framework class of a raw expression.

Properties§

public ?Dialect $dialect

Methods§

public function __construct(public ?Dialect $dialect)

Uses the configured framework SQL grammar.

Parameters

$dialect?Dialect
public function wrap(Domain $value): Domain

Wraps an identifier; expressions already represent SQL and unresolved names stay open where they are.

Parameters

$valueDomain

Returns

Test cases 5
Called from 23
Calls 11
public function wrapName(string $name): Domain

A resolved identifier written with the grammar's delimiters, aliases and qualifiers.

Parameters

$namestring

Returns

Test cases 1
Called from 3
Calls 12
public function opened(Term $term): Domain

The gap an unresolved identifier leaves, keeping where the value came from.

Parameters

$termTerm

Returns

Test cases 1
Called from 1
Calls 4
public function join(list<Domain> $parts, string $separator = ', '): Domain

Parameters

$partslist<Domain>Joins fragments without discarding holes or alternatives.
$separatorstring

Returns

Test cases 1
Called from 12
Calls 1
public function placeholders(Domain $values): Domain

The gap a placeholder list of unknown length leaves, keeping where the values came from.

Parameters

$valuesDomain

Returns

Test cases 1
Called from 1
Calls 7
public function element(Domain $values): Domain
public function rawBindings(Domain $sql, Domain $values): list<Domain>|null

Parameters

$sqlDomain
$valuesDomain

Returns

list<Domain>|null The values a raw fragment binds, one per placeholder when the array is unknown.
Test cases 1
Called from 2
Calls 8

Test cases 72§

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

Dedicated tests 11
Other tests reaching this symbol 61

Relations§

Instantiated in 7
Method calls 50
Constant reads 1
Type declarations 5