final class RecurringSchedule
    implements Schedule
    uses Snapshot
Public API: explicitly declared with @visibility public.

The schedule EVERY quantity unit [STARTS timestamp] [ENDS timestamp]: the event runs repeatedly.

Source: https://dev.mysql.com/doc/refman/8.4/en/create-event.html.

Reading a recurring scheduledoctest
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE EVENT e ON SCHEDULE EVERY 2 HOUR STARTS CURRENT_TIMESTAMP DO SELECT 1');
    [$create->statement->schedule->unit, $create->statement->schedule->ends] // => [\SqlSemantics\Platform\MySql\Statement\Expression\IntervalUnit::Hour, null]

Properties§

public Scalar $quantity
public Scalar|null $starts = null
public Scalar|null $ends = null

Methods§

public function __construct(
    public Scalar $quantity,
    public IntervalUnit $unit,
    public Scalar|null $starts = null,
    public Scalar|null $ends = null,
)

Parameters

$quantityScalarThe length of the interval between two runs
$unitIntervalUnitThe unit of the interval
$startsScalar|nullThe time of the first run, when written
$endsScalar|nullThe time after which the event no longer runs, when written
public function deriveSchedule(Derivation $derivation, Environment $environment): void

Derives the quantity and the time expressions.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 1
public function render(Output $out): void

Writes EVERY, the interval and the STARTS and ENDS clauses.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3
Other tests reaching this symbol 5

Relations§

Instantiated in 1