classStatisticsScope
final class StatisticsScope
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.
Derives the FROM items of CREATE STATISTICS and the scope of its columns and expressions.
Rule: PG-STATISTICS-SCOPE-001. The FROM items are derived as the FROM items of a query (PG-FROM-SCOPE-001), each seeing the ones before it; the columns and expressions see the relations the items make visible. The server accepts a single table and reports anything else. Source: https://www.postgresql.org/docs/17/sql-createstatistics.html. Termination: one pass over the items. Status: Implemented.
Methods§
public function derive(list<Relation> $from, Derivation $derivation): EnvironmentDerives the FROM items and answers the scope of the key terms.
Parameters
$from | list<Relation> | |
$derivation | Derivation |
Returns
Called from 1
Calls 5
- new FromScope line 34
- function-call
array_pushline 36 - method-call FromScope::open() line 36
- method-call Derivation::environment() line 36
- new Environment line 39
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
StatisticsScopeTestcalls