interface IntegerValued
Public API: explicitly declared with @visibility public.

An expression the raw parser already reads as a constant, which may denote an integer.

Type modifiers must be such constants: numeric(10, 2) is a type, numeric(a, 2) is an error. A numeric constant, a string constant and a negated numeric constant qualify; every other expression does not implement this interface. Source: https://www.postgresql.org/docs/17/datatype.html.

Reading the integer a constant denotesdoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\Constant(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\IntegerConstant('10')))->integerValue() // => '10'

Methods§

public function integerValue(): ?string

Answers the integer the constant denotes as canonical decimal digits with an optional minus sign, or null when it denotes none.

Returns

?string

Test cases 1§

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

Dedicated tests 1

Relations§

Implemented by 1
Type checks 1