final class AnalysisContext
    implements AnalysisContext
    uses Snapshot
Public API: explicitly declared with @visibility public.

A fixed language profile together with an immutable snapshot of relation declarations.

The context states what is known: the declarations, whether they enumerate every relation, and how names are compared. The same declaration object given twice is kept once; different objects with the same name are kept as a conflict. Nothing replaces a declaration, and no statement changes a context. Routines, data types and session variables are not declared in a version 1 context; facts that need them name them as missing inputs.

Telling an open context from a complete empty onedoctest
$semantics = new \SqlSemantics\Platform\PostgreSql\Semantics();
    [$semantics->context()->complete, $semantics->context([])->complete] // => [false, true]

Properties§

public list<Table> $tables
public non-empty-list<Name> $searchPath
public Name $declarationSchema
public LanguageProfile $profile
public bool $complete = true
public Comparison $relationNames = Comparison::Sensitive
public Comparison $columnNames = Comparison::Sensitive

Methods§

public function __construct(
    public LanguageProfile $profile,
    list<Name> $searchPath,
    list<Table> $tables = [],
    public bool $complete = true,
    public Comparison $relationNames = Comparison::Sensitive,
    public Comparison $columnNames = Comparison::Sensitive,
    Name|null $declarationSchema = null,
)

Parameters

$profileLanguageProfileThe fixed language profile
$searchPathlist<Name>The schemas searched for an unqualified relation name; at least one
$tableslist<Table>The relation declarations
$completeboolWhether the declarations enumerate every relation of the database
$relationNamesComparisonHow relation and schema names are compared
$columnNamesComparisonHow column names are compared
$declarationSchemaName|nullThe schema an unqualified declaration belongs to; the first searched schema by default
Calls 8
public function declared(QualifiedName $name, Name $schema): list<Table>

Test cases 1§

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

Other tests reaching this symbol 1

Relations§

Instantiated in 2
Method calls 2
Type checks 1
Type declarations 38