final class ValueKinds
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". Code outside that scope must not name this declaration.

Derives the set of storage classes SQLite expects a result expression of a compound arm to produce.

Rule: SQLITE-DATA-TYPE-001. When the affinity of a column of a compound query is decided, SQLite asks every other arm which kinds of value its expression can produce, as a set of three bits: numeric (1), text (2) and BLOB (4). A NULL produces nothing; a string literal, a concatenation and a double-quoted word that is no column produce text; a BLOB literal produces a BLOB; a bound parameter and a function call produce anything; a column, a subquery, a CAST and a row value produce numbers and BLOBs (numeric affinity), text and BLOBs (TEXT affinity), or anything (no affinity or BLOB affinity); a CASE produces what its results produce; and every other expression produces numbers. Parentheses, COLLATE and a unary plus are looked through. The set is not determined when an affinity it depends on is not. Terminates: each step enters a strict sub-expression. Source: https://sqlite.org/datatype3.html#affinity_of_expressions (and sqlite3ExprDataType() in expr.c of the release). Status: Implemented.

Constants§

public const NUMBER = 0x1

The bit of a value that is an integer or a real number.

public const TEXT = 0x2

The bit of a value that is text.

public const BLOB = 0x4

The bit of a value that is a BLOB.

public const FIXED = [\SqlSemantics\Platform\Sqlite\Statement\Expression\Literal\NullLiteral::class …

The kinds of value the expressions whose class alone decides them produce.

Methods§

public function results(CaseExpression $expression, Facts $facts): ?int

Answers the kinds of value a CASE can produce: the union over its results.

Parameters

$expressionCaseExpression
$factsFacts

Returns

?int
Test cases 1
Called from 1
Calls 2

Test cases 5§

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

Dedicated tests 4
Other tests reaching this symbol 1

Relations§

Instantiated in 2
Method calls 2
Constant reads 2