LiteralDomain
The literals a column's decoded values compare with; binding and evaluation both ask it.
Cases
Methods
- forColumn() : PreImage}
- The domain of the column's decoded values and their pre-image: null when no literal compares with them exactly.
- holds() : bool
- holdsPrefix() : bool
- Whether a StartsWith prefix compares with the decoded values.
- key() : int|string|null
- Values equal in the domain's order share a key (int 1 and float 1.0 alike), so IN looks a value up instead of ordering it against each literal. Null orders it instead: NaN, a number beyond ±2^53 (where int and float equality stops being transitive), a boolean, a float against UINT_64.
- normalise() : bool|DateTimeImmutable|float|int|string
- The literal as the domain's values spell it: a uuid in lowercase, the form it decodes to.
Cases
Boolean
Bytes
DateTime
None
Number
UnsignedInteger64
Uuid
Methods
forColumn()
The domain of the column's decoded values and their pre-image: null when no literal compares with them exactly.
public
static forColumn(FlatColumn $column, Converter|null $converter) : PreImage}
Parameters
- $column : FlatColumn
- $converter : Converter|null
Return values
PreImage}holds()
public
holds(bool|DateTimeImmutable|float|int|string $literal) : bool
Parameters
- $literal : bool|DateTimeImmutable|float|int|string
Return values
boolholdsPrefix()
Whether a StartsWith prefix compares with the decoded values.
public
holdsPrefix() : bool
Return values
boolkey()
Values equal in the domain's order share a key (int 1 and float 1.0 alike), so IN looks a value up instead of ordering it against each literal. Null orders it instead: NaN, a number beyond ±2^53 (where int and float equality stops being transitive), a boolean, a float against UINT_64.
public
key(mixed $value) : int|string|null
Parameters
- $value : mixed
Return values
int|string|nullnormalise()
The literal as the domain's values spell it: a uuid in lowercase, the form it decodes to.
public
normalise(bool|DateTimeImmutable|float|int|string $literal) : bool|DateTimeImmutable|float|int|string
Parameters
- $literal : bool|DateTimeImmutable|float|int|string