classBitStringConstant
final class BitStringConstant
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The value of a bit-string constant: its notation and the digits between the quotes.
The scanner accepts any characters between the quotes and the bit input function interprets them later, so the digits are opaque text here; a hexadecimal digit stands for four bits. Source: https://www.postgresql.org/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-BIT-STRINGS.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("SELECT X'1F'");
$value = $query->statement->targets[0]->expression->value;
[$value->radix, $value->digits] // => [\SqlSemantics\Platform\PostgreSql\Statement\Literal\BitStringRadix::Hexadecimal, '1F']Properties§
public BitStringRadix $radixpublic string $digitsMethods§
public function __construct(public BitStringRadix $radix, public string $digits)Parameters
$radix | BitStringRadix | The notation of the digits |
$digits | string | The text between the quotes |
Calls 2
- static-call Check::input() line 36
- function-call
str_containsline 36
public function render(Output $out): voidWrites the notation prefix and the quoted digits.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::spelled() line 44
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.