final class Binder
Public API: explicitly declared with @visibility public.

Performs the SQL semantic phase: name binding, type resolution, and NULL propagation.

Accept this semantic value in a database-independent consumerdoctest
$consume = static fn (\SqlSemantics\Core\Binder $value): string => $value::class;
    $consume instanceof \Closure // => true

Properties§

public Schema $schema

Methods§

public function __construct(public Schema $schema)

Uses the schema's dialect, grammar release, and default name resolution schema.

Parameters

$schemaSchema
Calls 1
public function bind(string $sql): BoundSelect

Parses SQL and binds one SELECT into an immutable semantic representation.

Parameters

$sqlstringOne SELECT statement in the schema's dialect

Returns

BoundSelect Bound relations and expressions with types, NULL facts, and source syntax

Throws

SemanticException When names, types, or supported semantics cannot be resolved
LexicalException When SQL contains invalid tokens
SyntaxException When SQL does not match the selected grammar
Test cases 76
Calls 5

Private surface 1§

Implementation details, listed for orientation only.

private DialectParser $parser

Test cases 109§

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 103