enumOperatorChangeAttribute
enum OperatorChangeAttribute: string
implements KnownAttribute
@visibility public.An attribute ALTER OPERATOR ... SET recognizes.
AlterOperator reads restrict and join as selectivity estimators (without a value, or with NONE, the estimator is removed), and from PostgreSQL 17 commutator and negator as operators and merges and hashes as Booleans. leftarg, rightarg, function and procedure, and in PostgreSQL 16 also commutator, negator, merges and hashes, are recognized only to be refused: they cannot be changed. Any other attribute is an error. Source: https://www.postgresql.org/docs/17/sql-alteroperator.html, AlterOperator in src/backend/commands/operatorcmds.c of PostgreSQL 16 and 17.
\SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Known\OperatorChangeAttribute::from('negator')->reading() // => \SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Reading::OperatorCases§
case Restrict = 'restrict'case Join = 'join'case Commutator = 'commutator'case Negator = 'negator'case Merges = 'merges'case Hashes = 'hashes'case Leftarg = 'leftarg'case Rightarg = 'rightarg'case Function = 'function'case Procedure = 'procedure'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 OperatorChangeAttribute::tryFrom() line 60
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 OperatorChangeAttribute::READINGS() line 76
Private surface 1§
Implementation details, listed for orientation only.
private const READINGS = ['restrict' => \SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Rea…Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 2
Relations§
Constant reads 5
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Routine\OperatorClassRule::statement() packages/sql-semantics-postgres/src/Lowering/Routine/OperatorClassRule.php:85
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\ChangeChecks::changeable() packages/sql-semantics-postgres/src/Rules/Routine/ChangeChecks.php:81
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\ChangeChecks::changeable() packages/sql-semantics-postgres/src/Rules/Routine/ChangeChecks.php:81
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\ChangeChecks::changeable() packages/sql-semantics-postgres/src/Rules/Routine/ChangeChecks.php:81
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\ChangeChecks::changeable() packages/sql-semantics-postgres/src/Rules/Routine/ChangeChecks.php:81