classJsonExistsColumn
final class JsonExistsColumn
implements JsonTableColumn
uses Snapshot
Public API: explicitly declared with
@visibility public.name type EXISTS [PATH path] [ON ERROR]: a JSON_TABLE column that tells whether the path yields an item.
Mirrors PostgreSQL's JsonTableColumn of type JTC_EXISTS. A column named nested is written quoted: before a type named path gram.y reads the word as the NESTED PATH of a nested column (NESTED has a lower precedence than PATH). Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-TABLE.
$column = new \SqlSemantics\Platform\PostgreSql\Statement\Relation\Json\JsonExistsColumn(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('e'), new \SqlSemantics\Platform\PostgreSql\Statement\Type\TypeName(new \SqlSemantics\Platform\PostgreSql\Statement\Type\Designation\KeywordDesignation(\SqlSemantics\Platform\PostgreSql\Statement\Type\Designation\TypeKeyword::Boolean)));
$column->path // => nullProperties§
public Name $namepublic TypeName $typepublic StringConstant|null $path = nullpublic Clause|null $onError = nullMethods§
public function __construct(
public Name $name,
public TypeName $type,
public StringConstant|null $path = null,
public Clause|null $onError = null,
)Parameters
$name | Name | The column name |
$type | TypeName | The column type |
$path | StringConstant|null | The path written after PATH |
$onError | Clause|null | The ON ERROR behavior |
public function render(Output $out): voidWrites the column definition.
Parameters
$out | Output |
Calls 5
- method-call Output::name() line 47
- class-const NameUse::Identifier() line 47
- class-const NameUse::Column() line 47
- method-call Output::keyword() line 49
- method-call Output::node() line 51
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
JsonExistsColumnTestcalls
Relations§
Instantiated in 1
Type checks 2
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::columns() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:154
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::typed() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:168