classMaintenanceFacts
final class MaintenanceFacts
Derives the tables and columns VACUUM and ANALYZE name.
Rule: PG-MAINTENANCE-TARGET-001. Each table name resolves by PG-TABLE-TARGET-001. A listed column is looked up among the columns of a declared table whose column list is complete, system columns excluded; a column it does not have is the diagnostic the server raises. With an undeclared table or an incomplete column list nothing is claimed about the columns: the fact of the table carries the missing declaration. Termination: one pass over the tables and their columns. Source: https://www.postgresql.org/docs/17/sql-analyze.html, https://www.postgresql.org/docs/17/sql-vacuum.html. Status: Implemented.
Methods§
public function targets(Derivation $derivation, list<MaintenanceTarget> $targets): boolRecords the facts of each table and tells whether any table lists columns.
Parameters
$derivation | Derivation | |
$targets | list<MaintenanceTarget> |
Returns
boolCalled from 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Analyze::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Analyze.php:68
- method-call SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Vacuum::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Vacuum.php:71
Calls 7
- method-call Derivation::target() line 40
- method-call Targets::resolve() line 40
- new Targets line 40
- method-call MaintenanceFacts::has() line 50
- method-call Derivation::report() line 51
- new UtilityProblem line 51
- class-const UtilityProblemKind::MissingColumn() line 51
public function has(Derivation $derivation, list<string> $declared, string $name): boolTells whether a name is among declared column names under the name comparison of the context.
Parameters
$derivation | Derivation | |
$declared | list<string> | |
$name | string |
Returns
boolTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
MaintenanceFactsTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Analyze::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Analyze.php:68
- new SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Vacuum::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Vacuum.php:71
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Analyze::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Analyze.php:68
- method-call SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Vacuum::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Vacuum.php:71