classOnUpdate
final class OnUpdate
implements ColumnAttribute
uses Snapshot
Public API: explicitly declared with
@visibility public.The ON UPDATE clause of a TIMESTAMP or DATETIME column: the current timestamp function that updates the column when another column of the row changes.
Source: https://dev.mysql.com/doc/refman/8.4/en/timestamp-initialization.html.
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE TABLE t (a TIMESTAMP ON UPDATE CURRENT_TIMESTAMP)');
$create->statement->elements[0]->specification->attributes[0] instanceof \SqlSemantics\Platform\MySql\Statement\Table\Column\OnUpdate // => trueProperties§
public Scalar $valueMethods§
public function __construct(public Scalar $value)Parameters
$value | Scalar | The value |
public function deriveAttribute(Derivation $derivation, Environment $scope): voidDerives the value inside the table definition.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 1
- method-call Derivation::scalar() line 39
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.