classCreateAssertion
final class CreateAssertion
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.CREATE ASSERTION: a condition over the database, which the grammar reads and the server does not implement.
The grammar keeps the SQL-standard statement; the server rejects it with "CREATE ASSERTION is not yet
- implemented", which is reported. The condition is derived where no relation is visible.
Source: https://www.postgresql.org/docs/17/unsupported-features-sql-standard.html.
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE ASSERTION a CHECK (1 = 1)') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: CREATE ASSERTION is not yet implementedProperties§
public list<ConstraintAttribute> $attributespublic DottedName $namepublic Scalar $conditionMethods§
public function __construct(
public DottedName $name,
public Scalar $condition,
list<ConstraintAttribute> $attributes = [],
)Parameters
$name | DottedName | The assertion name |
$condition | Scalar | The condition |
$attributes | list<ConstraintAttribute> | The attributes in the order written |
Calls 2
- method-call Attributes::checked() line 46
- new Attributes line 46
public function deriveStatement(Derivation $derivation): voidReports that the server does not implement the statement and derives the condition.
Parameters
$derivation | Derivation |
Calls 6
- method-call Derivation::report() line 54
- new DefinitionProblem line 54
- class-const DefinitionRule::Unimplemented() line 54
- new Name line 54
- method-call Derivation::scalar() line 55
- method-call Derivation::environment() line 55
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 63
- method-call Writing::sequence() line 64
- new Writing line 64
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CreateAssertionTestcalls