enumOperatorAttribute
enum OperatorAttribute: string
implements KnownAttribute
@visibility public.An attribute CREATE OPERATOR recognizes.
DefineOperator reads leftarg and rightarg as type names, function and its older spelling procedure as the operator's function, restrict and join as its selectivity estimators, commutator and negator as operators and hashes and merges as Booleans. The obsolete sort1, sort2, ltcmp and gtcmp mean merges whatever their value. Any other attribute draws a warning and is ignored. Source: https://www.postgresql.org/docs/17/sql-createoperator.html, DefineOperator in src/backend/commands/operatorcmds.c of PostgreSQL 17.
\SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Known\OperatorAttribute::from('procedure')->reading() // => \SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Reading::FunctionCases§
case Leftarg = 'leftarg'case Rightarg = 'rightarg'case Function = 'function'case Procedure = 'procedure'case Commutator = 'commutator'case Negator = 'negator'case Restrict = 'restrict'case Join = 'join'case Hashes = 'hashes'case Merges = 'merges'case Sort1 = 'sort1'case Sort2 = 'sort2'case Ltcmp = 'ltcmp'case Gtcmp = 'gtcmp'Methods§
public static function named(string $name): ?selfAnswers the member with exactly this name, or null.
Parameters
$name | string |
Returns
?selfTest cases 2
Calls 1
- static-call OperatorAttribute::tryFrom() line 67
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 OperatorAttribute::READINGS() line 83
Private surface 1§
Implementation details, listed for orientation only.
private const READINGS = ['leftarg' => \SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Read…Test cases 27§
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 24
DefineRuleTest::testAttributesReadsTheAttributesOfTheCommandcallsAttributeChecksTest::testDeriveIgnoresTheValueOfAnObsoleteOperatorAttributecallsAttributeReaderTest::testAttributeReadsARecognizedNameAndKeepsAnotherAsWrittencallsAttributeReaderTest::testCommandAnswersTheAttributeSetOfAKindcallsDefineChecksTest::testAggregateReportsMovingSerializationHypotheticalAndBaseTypecallsDefineChecksTest::testBaseTypeReportsTheMissingOutputFunctioncallsDefineChecksTest::testCollationFollowsTheProvidercallsDefineChecksTest::testOperatorTellsAMissingRightArgumentFromMissingArgumentscallsDefineChecksTest::testPresentKeepsTheLastRecognizedAttributeOfEachNamecallsDefineChecksTest::testProvidedReportsWhatOnlyIcuTakescallsDefineChecksTest::testSearchReportsAConfigurationWithParserAndCopycallsAttributeTest::testAcceptsAWrittenValueTheCommandRejectscallsAttributeTest::testDeriveClauseDerivesTheValuecallsAttributeTest::testRejectsAMemberOfAnotherNamecallsAttributeTest::testRejectsAValueReadAnotherWaycallsAttributeTest::testRejectsAWrittenValueTheCommandReadscallsAttributeTest::testRenderWritesTheNameAsALabelAndTheValuecallsAttributeTest::testValuedTellsWhetherAValueIsWrittencallsKnownAttributeTest::testEveryCommandSetIsAKnownAttributecallsKnownAttributeTest::testNamedComparesRespectingCasecallsKnownAttributeTest::testReadingAnswersHowTheCommandReadsTheValuecallsDefineTest::testDeriveStatementReadsTheFunctionOfAnOperatorAsARoutinecallsDefineTest::testRejectsAnAttributeOfAnotherCommandcallsAlterOperatorTest::testRejectsAnAttributeOfAnotherCommandcalls
Relations§
Constant reads 4
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeChecks packages/sql-semantics-postgres/src/Rules/Routine/AttributeChecks.php:60
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeChecks::value() packages/sql-semantics-postgres/src/Rules/Routine/AttributeChecks.php:118
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeChecks::value() packages/sql-semantics-postgres/src/Rules/Routine/AttributeChecks.php:118
- class-const SqlSemantics\Platform\PostgreSql\Rules\Routine\AttributeReader packages/sql-semantics-postgres/src/Rules/Routine/AttributeReader.php:64