enum Clock: string
Public API: explicitly declared with @visibility public.

The functions that read the current date or time of the statement or of the system clock.

Each case holds the keyword the function is written with. CURRENT_DATE is the keyword CURDATE, CURRENT_TIME is CURTIME, and CURRENT_TIMESTAMP, LOCALTIME and LOCALTIMESTAMP are NOW to the lexer. NOW and its synonyms read the time the statement started; SYSDATE reads the time it executes. Source: https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_now.

Reading the keyword of a casedoctest
\SqlSemantics\Platform\MySql\Statement\Call\Clock::Now->value // => 'NOW'

Cases§

case Now = 'NOW'
case CurrentTime = 'CURTIME'
case SystemDate = 'SYSDATE'
case UtcTime = 'UTC_TIME'
case UtcTimestamp = 'UTC_TIMESTAMP'
case CurrentDate = 'CURDATE'
case UtcDate = 'UTC_DATE'

Methods§

public function precise(): bool

Tells whether the function takes a fractional seconds precision.

Returns

bool
Called from 1
Calls 2
public function bare(): ?string

Answers the keyword that writes the function without parentheses, or null when it is only written with them.

NOW, CURTIME, CURDATE and SYSDATE are keywords only before an opening parenthesis (SYM_FN in sql/lex.h); without one the function is written CURRENT_TIMESTAMP, CURRENT_TIME or CURRENT_DATE, and SYSDATE cannot be.

Returns

?string
Reading the keyword NOW is written with without parenthesesdoctest
\SqlSemantics\Platform\MySql\Statement\Call\Clock::Now->bare() // => 'CURRENT_TIMESTAMP'
Test cases 1
Called from 2
Calls 7

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§

Method calls 4
Constant reads 7
Type declarations 1