classAssignment
final class Assignment
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.An assignment of one value to one column of the written table.
$update = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('UPDATE t SET a = 1');
[$update->statement->assignments[0]->column->value, $update->statement->assignments[0]->value->digits] // => ['a', '1']Properties§
public Name $columnpublic Scalar $valueMethods§
public function __construct(public Name $column, public Scalar $value)Parameters
$column | Name | The assigned column |
$value | Scalar | The new value |
public function render(Output $out): voidWrites the assignment.
Parameters
$out | Output |
Calls 2
- method-call Output::name() line 39
- class-const NameUse::Column() line 39
Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 11
MutationRuleTest::testAssignmentsKeepsTheWrittenOrderAndTheListFormcallsMutationRuleTest::testAssignmentsStartWithAListFormcallsUpsertRuleTest::testTailLowersTargetedDoUpdateAndDoNothingClausesInWrittenOrdercallsInsertFactsTest::testDeriveLetsUpsertsSeeTheTargetAndExcludedInTheRightPlacescallsMutationScopeTest::testAssignChecksTheColumnsAndTheWidthOfEachAssignmentcallsTriggerFactsTest::testDeriveReportsTriggerOnlyMisusesAndTheColumnsOfUpdateOfcallsInsertRowsTest::testDeriveWithinLetsDoUpdateSeeTheTableAndExcludedcallsUpdateTest::testDeriveWithinSeesTheTargetAndTheFromTablesInAssignmentsAndWherecallsUpsertTest::testAssignmentsAndPredicateSeeTheTableAndExcludedcallsCreateTriggerTest::testDeriveStatementResolvesNewAndOldToTheWatchedTablecallsCreateTriggerTest::testRejectsAStepWithAWithClausecalls
Relations§
Instantiated in 1
Constant reads 2
Type checks 2
- instanceof SqlSemantics\Platform\Sqlite\Rules\Mutation\GeneratedWrites::assigned() packages/sql-semantics-sqlite/src/Rules/Mutation/GeneratedWrites.php:96
- instanceof SqlSemantics\Platform\Sqlite\Rules\Mutation\MutationScope::assign() packages/sql-semantics-sqlite/src/Rules/Mutation/MutationScope.php:91