classGetFormat
final class GetFormat
implements Scalar
uses Snapshot
Public API: explicitly declared with
@visibility public.A call of GET_FORMAT(kind, standard): a format string for DATE_FORMAT and STR_TO_DATE.
Rule: MYSQL-GET-FORMAT-001. The result is a character string; it is NULL for a standard name the server does not know. Terminates: the operand is a strict part. Source: https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_get-format. Status: Implemented.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SELECT GET_FORMAT(DATE, 'EUR')");
$query->field(0)->type->descriptor->name() // => 'VARCHAR'Properties§
public TemporalFormat $formatpublic Scalar $standardMethods§
public function __construct(public TemporalFormat $format, public Scalar $standard)Parameters
$format | TemporalFormat | The kind of value |
$standard | Scalar | The name of the standard |
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives the operand; the result is a character string.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 4
- method-call ResultTyping::fact() line 47
- new ResultTyping line 47
- method-call Arguments::one() line 47
- new Arguments line 47
public function render(Output $out): voidTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.