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

A supported SQL release and its grammar AST; lexical rules are declared in PHP.

Properties§

public string $dialect
public string $name
public string $astPath

Methods§

public function __construct(public string $dialect, public string $name, public string $astPath)

Parameters

$dialectstringDialect the artifacts describe
$namestringRelease the artifacts describe
$astPathstringWhere the grammar AST is read from or written to
Test cases 2
public static function resolve(string $dialect, string|null $version = null): self

Answers the artifacts this package ships for one release.

Parameters

$dialectstringDialect the caller generates SQL for
$versionstring|nullRelease to resolve, or null for the dialect default

Returns

self Artifacts committed for that release

Throws

RuntimeException When the dialect or the release is not one this package ships
Test cases 3
Called from 9
Calls 2
public static function names(string $dialect): list<string>

Answers every release one dialect ships, oldest first.

Parameters

$dialectstringDialect to enumerate

Returns

list<string> Release names in the order they were registered

Throws

RuntimeException When the dialect is not one this package ships
Test cases 3
Calls 2
public static function all(): list<self>

Answers every release of every dialect, so a caller can act on all of them.

Returns

list<self> Artifacts committed for each registered release

Throws

RuntimeException When the record names a release it does not describe
Test cases 1
Calls 2

Test cases 28§

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 22

Relations§

Instantiated in 1
Static calls 9
Type declarations 2