final class Text
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

A string at a position that is not an expression: a comment, a file name, a password, a separator, a member of an ENUM.

It is written as a quoted string or, where the grammar allows it, as a hexadecimal or bit literal that stands for a string. The value is the decoded bytes of a quoted string, or the digits of the other two forms. It is an operand of the statement that holds it and has no type fact of its own. Source: https://dev.mysql.com/doc/refman/8.4/en/string-literals.html, https://dev.mysql.com/doc/refman/8.4/en/hexadecimal-literals.html.

Holding decoded textdoctest
(new \SqlSemantics\Platform\MySql\Statement\Literal\Text("it's"))->value // => "it's"

Properties§

public string $value
public EscapeRule $escapes = EscapeRule::Backslash
public Radix|null $radix = null

Methods§

public function __construct(
    public string $value,
    public EscapeRule $escapes = EscapeRule::Backslash,
    public Radix|null $radix = null,
)

Parameters

$valuestringThe decoded bytes of a quoted string, or the digits of a hexadecimal or bit literal
$escapesEscapeRuleThe rule a quoted string is spelled under; the rule of the language profile
$radixRadix|nullThe digit system when the text is written as a hexadecimal or bit literal
Calls 5

Test cases 74§

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

Dedicated tests 6
Other tests reaching this symbol 68

Relations§

Instantiated in 4
Constant reads 5
Type checks 5
Type declarations 89