classInspectedTable
final class InspectedTable
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The table or view a SHOW or DESCRIBE reports on.
The node is the table use: its resolution is the relation fact the operation records for it (MYSQL-SHOW-TARGET-001).
$semantics = new \SqlSemantics\Platform\MySql\Semantics();
$table = $semantics->analyze('CREATE TABLE t (a INT)');
$show = $semantics->analyze('SHOW CREATE TABLE t', [$table]);
$show->facts->relation($show->statement->table)->table->table === $table->declarations()[0] // => trueProperties§
public QualifiedName $nameMethods§
public function __construct(public QualifiedName $name)Parameters
$name | QualifiedName | The table name with its optional database |
Calls 1
- static-call Check::input() line 36
public function render(Output $out): voidWrites the database and the table name.
Parameters
$out | Output |
Calls 3
- method-call Output::name() line 45
- class-const NameUse::Qualifier() line 45
- class-const NameUse::Relation() line 47
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
InspectedTableTestcalls
Relations§
Instantiated in 6
- new SqlSemantics\Platform\MySql\Lowering\Utility\Explain\ExplainRule::statement() packages/sql-semantics-mysql/src/Lowering/Utility/Explain/ExplainRule.php:88
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::schema() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:133
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::schema() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:134
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::columns() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:155
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::keys() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:169
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ObjectRule::table() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ObjectRule.php:132
Type declarations 7
- type SqlSemantics\Platform\MySql\Lowering\Utility\Show\ObjectRule packages/sql-semantics-mysql/src/Lowering/Utility/Show/ObjectRule.php:130
- type SqlSemantics\Platform\MySql\Rules\Utility\ShowTargets packages/sql-semantics-mysql/src/Rules/Utility/ShowTargets.php:43
- type SqlSemantics\Platform\MySql\Statement\Utility\Explain\DescribeTable packages/sql-semantics-mysql/src/Statement/Utility/Explain/DescribeTable.php:43
- type SqlSemantics\Platform\MySql\Statement\Utility\Show\Schema\ShowColumns packages/sql-semantics-mysql/src/Statement/Utility/Show/Schema/ShowColumns.php:51
- type SqlSemantics\Platform\MySql\Statement\Utility\Show\Schema\ShowCreateTable packages/sql-semantics-mysql/src/Statement/Utility/Show/Schema/ShowCreateTable.php:48
- type SqlSemantics\Platform\MySql\Statement\Utility\Show\Schema\ShowCreateView packages/sql-semantics-mysql/src/Statement/Utility/Show/Schema/ShowCreateView.php:39
- type SqlSemantics\Platform\MySql\Statement\Utility\Show\Schema\ShowKeys packages/sql-semantics-mysql/src/Statement/Utility/Show/Schema/ShowKeys.php:50