interfaceSchemaRules
interface SchemaRules
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Supplies declaration syntax and constraint behavior.
Methods§
public function primaryOptionsNotNull(Node $source): boolReports whether table options make every primary key column nonnullable.
Parameters
$source | Node |
Returns
boolpublic function primaryNotNull(
ColumnDefinition $column,
list<string> $primary,
list<TableConstraint> $constraints,
): boolParameters
$column | ColumnDefinition | |
$primary | list<string> | |
$constraints | list<TableConstraint> |
Returns
boolpublic function tableKey(TableDefinition $table): stringReturns the declaration identity used for duplicate detection.
Parameters
$table | TableDefinition |
Returns
stringpublic function qualify(
Node $header,
list<string> $parts,
Identifiers $identifiers,
): list<string>Parameters
$header | Node | |
$parts | list<string> | |
$identifiers | Identifiers |
Returns
list<string>Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
SchemaRulesTest::testColumnNodesHonorsAnInjectedPolicycallsSchemaRulesTest::testPrimaryNotNullPromotesAnIntegerKeycallsSchemaRulesTest::testQualifyPreservesExplicitNamespacescallsSchemaRulesTest::testSchemaNodeRetainsOriginalDeclarationcallsSchemaRulesTest::testTableKeyDistinguishesNamescallsSchemaRulesTest::testValidateAcceptsOrdinaryDeclarationscalls
Relations§
Implemented by 3
Type declarations 4
- type SqlSemantics\Platform\MySql\Platform packages/sql-semantics-mysql/src/Platform.php:126
- type SqlSemantics\Platform\PostgreSql\Platform packages/sql-semantics-postgres/src/Platform.php:123
- type SqlSemantics\Platform\Sqlite\Platform packages/sql-semantics-sqlite/src/Platform.php:123
- type SqlSemantics\Core\Platform packages/sql-semantics/src/Core/Platform.php:58