final class TableCall
    implements Relation
    uses Snapshot
Public API: explicitly declared with @visibility public.

One occurrence of a table-valued function as query input: a name with arguments.

Rule: SQLITE-TABLE-CALL-001. The arguments are derived where the relations to the left of the call are visible. A name that is a declared relation or a common table has the shape of that relation; any other name is a table-valued function, whose columns come from a virtual table module the context does not declare, so the shape is open and names the undeclared routine. Source: https://sqlite.org/vtab.html#table_valued_functions. Status: Implemented.

Reading a table-valued function calldoctest
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze("SELECT * FROM json_each('[1]') AS j", []);
    [$query->statement->from->name->name->value, count($query->statement->from->arguments), $query->shape()->missing[0]->describe()] // => ['json_each', 1, 'the signature of routine json_each']

Properties§

public list<Scalar> $arguments
public Name|null $alias = null
public bool $as = true

Methods§

public function __construct(
    public QualifiedName $name,
    list<Scalar> $arguments,
    public Name|null $alias = null,
    public bool $as = true,
)

Parameters

$nameQualifiedNameThe function name with its optional schema
$argumentslist<Scalar>The arguments in order
$aliasName|nullThe correlation name
$asboolWhether the keyword AS introduces the alias; SQLite names a column after the text of an expression, which includes it

Throws

InvalidConstruction When AS is left out without an alias
Calls 3
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Derives the arguments and the shape of the occurrence.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 7
public function render(Output $out): void

Writes the call and the correlation name.

Parameters

$outOutput
Calls 5

Test cases 6§

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 2

Relations§

Instantiated in 1
Type checks 3