enumRangeAttribute
enum RangeAttribute: string
implements KnownAttribute
@visibility public.An attribute CREATE TYPE name AS RANGE ( ... ) recognizes.
DefineRange reads subtype as a type name, subtype_opclass as an operator class, collation as a collation, canonical and subtype_diff as routine names and multirange_type_name as the name of the multirange type it creates. Each attribute may be given once; any other attribute is an error. Source: https://www.postgresql.org/docs/17/sql-createtype.html, DefineRange in src/backend/commands/typecmds.c of PostgreSQL 17.
\SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Known\RangeAttribute::from('multirange_type_name')->reading() // => \SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Reading::CreatedTypeCases§
case Subtype = 'subtype'case SubtypeOpclass = 'subtype_opclass'case Collation = 'collation'case Canonical = 'canonical'case SubtypeDiff = 'subtype_diff'case MultirangeTypeName = 'multirange_type_name'Methods§
public static function named(string $name): ?selfAnswers the member with exactly this name, or null.
Parameters
$name | string |
Returns
?selfTest cases 1
Calls 1
- static-call RangeAttribute::tryFrom() line 50
public function text(): stringAnswers the attribute name the command compares with.
Returns
stringpublic function reading(): ReadingAnswers how the command reads the attribute's value.
Returns
Calls 1
- class-const RangeAttribute::READINGS() line 66
Private surface 1§
Implementation details, listed for orientation only.
private const READINGS = ['subtype' => \SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Read…Test cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Relations§
Static calls 1
Constant reads 3
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Routine\DefineRule::type() packages/sql-semantics-postgres/src/Lowering/Routine/DefineRule.php:98
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeChecks packages/sql-semantics-postgres/src/Rules/Routine/AttributeChecks.php:63
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\DefineChecks::range() packages/sql-semantics-postgres/src/Rules/Routine/DefineChecks.php:86