classMissingColumn
final class MissingColumn
implements Resolution, Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A name that no visible relation has, established by complete declarations.
$semantics = new \SqlSemantics\Platform\MySql\Semantics();
$table = $semantics->analyze('CREATE TABLE t (a INTEGER)');
$semantics->analyze('SELECT b FROM t', [$table]) // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Column b does not exist.Properties§
public Name $namepublic QualifiedName|null $qualifier = nullMethods§
public function __construct(public Name $name, public QualifiedName|null $qualifier = null)Parameters
$name | Name | The column name |
$qualifier | QualifiedName|null | The relation qualifier the use wrote |
public function message(): stringDescribes the problem.
Returns
stringTest cases 20§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 20
ColumnResolverTest::testFactAnswersTheFactsOfTheColumnOrTheProblemcallsColumnResolverTest::testFindIgnoresAliasesForAQualifiedNamecallsColumnResolverTest::testUnlistedAnswersTheOccurrencesThatMayGiveAHavingPositionTheNamecallsChangeFactsTest::testDeleteSeesTheTablecallsInsertFactsTest::testQueryDerivesTheSourceWithoutTheTablecallsLoadFactsTest::testDeriveReportsAnUnknownColumncallsSourceRelationsTest::testVisibleOffersNothingForAGroupedSourcecallsWriteScopeTest::testAssignAnswersTheAssignedColumnscallsExpressionFactsTest::testOrderingSeesTheOutputColumnsButNoTableOfTheQuerycallsFromScopeTest::testOpenMakesATableVisibleUnderItsCorrelationNamecallsColumnUseTest::testDeriveScalarReportsAMissingColumncallsColumnUseTest::testDeriveScalarReportsAQualifierThatNamesNoRelationEvenInAnOpenContextcallsNameConversionTest::testADerivedColumnNamedAfterAsciiTextIsKnowncallsSelectExpressionTest::testDeriveNamesTheColumnsOfADerivedTableAfterTheirTextcallsSelectTest::testDeriveQueryReportsAColumnWithAWrongQualifiercallsSelectTest::testDeriveQueryReportsAMissingTableInACompleteContextcallsDerivedTableTest::testDeriveRelationSeesTheTablesToTheLeftWhenLateralcallsJoinedTableTest::testDeriveRelationReportsAUsingColumnAnOperandLackscallsTableListTest::testDeriveRelationKeepsTheJoinConditionToItsOperandscallsBareNameTest::testDeriveScalarResolvesARowOfATriggerAsAColumncalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Model\Resolution\ColumnLookup::find() packages/sql-semantics-mysql/src/Model/Resolution/ColumnLookup.php:54
- new SqlSemantics\Platform\MySql\Rules\ColumnResolver::find() packages/sql-semantics-mysql/src/Rules/ColumnResolver.php:114
- new SqlSemantics\Platform\MySql\Rules\Query\From\Joining::locate() packages/sql-semantics-mysql/src/Rules/Query/From/Joining.php:134