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

Structures every statement of a selected SQL language into independent values.

This entry point needs no schema or database connection. Use Binder separately when schema-dependent name, type, and nullability facts are needed.

Reconstructing SQL with the SQLite database packagedoctest
$semantics = new \SqlSemantics\Facade\Semantics(\SqlSemantics\Platform\Sqlite\Dialect::Sqlite);
    $semantics->analyze('DROP TABLE example')->toString() // => 'DROP TABLE example'

Methods§

public function __construct(Dialect $dialect, ?string $grammarVersion = null)

Selects the dialect and optionally one of its shipped grammar releases.

Parameters

$dialectDialect
$grammarVersion?string
Calls 1

Private surface 1§

Implementation details, listed for orientation only.

private Analyzer $analyzer

Test cases 18§

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

Dedicated tests 1
Other tests reaching this symbol 17