{"modulePath":"github.com/cockroachdb/cockroachdb-parser","version":"v0.25.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package treecmp\n\nPackage treecmp contains the implementation-agnostic information about all comparison operators that we support.\n\n## Functions\n\n```go\nfunc ComparisonOpName(op ComparisonOperatorSymbol) string\n```\nComparisonOpName returns the name of op.\n\n## Types\n\n```go\ntype ComparisonOperator struct {\n\tSymbol ComparisonOperatorSymbol\n\t// IsExplicitOperator is true if OPERATOR(symbol) is used.\n\tIsExplicitOperator bool\n}\n```\nComparisonOperator represents a binary operator which returns a bool.\n\n```go\nfunc MakeComparisonOperator(symbol ComparisonOperatorSymbol) ComparisonOperator\n```\nMakeComparisonOperator creates a ComparisonOperator given a symbol.\n\n```go\nfunc (ComparisonOperator) Operator()\n```\nOperator implements tree.Operator.\n\n```go\nfunc (o ComparisonOperator) String() string\n```\n\n```go\ntype ComparisonOperatorSymbol int\n```\nComparisonOperatorSymbol represents a comparison operator symbol.\n\n```go\nconst (\n\tEQ ComparisonOperatorSymbol = iota\n\tLT\n\tGT\n\tLE\n\tGE\n\tNE\n\tIn\n\tNotIn\n\tLike\n\tNotLike\n\tILike\n\tNotILike\n\tSimilarTo\n\tNotSimilarTo\n\tRegMatch\n\tNotRegMatch\n\tRegIMatch\n\tNotRegIMatch\n\tIsDistinctFrom\n\tIsNotDistinctFrom\n\tContains\n\tContainedBy\n\tJSONExists\n\tJSONSomeExists\n\tJSONAllExists\n\tOverlaps\n\tTSMatches\n\n\t// The following operators will always be used with an associated SubOperator.\n\t// If Go had algebraic data types they would be defined in a self-contained\n\t// manner like:\n\t//\n\t// Any(ComparisonOperator)\n\t// Some(ComparisonOperator)\n\t// ...\n\t//\n\t// where the internal ComparisonOperator qualifies the behavior of the primary\n\t// operator. Instead, a secondary ComparisonOperator is optionally included in\n\t// ComparisonExpr for the cases where these operators are the primary op.\n\t//\n\t// ComparisonOperator.HasSubOperator returns true for ops in this group.\n\tAny\n\tSome\n\tAll\n\n\tNumComparisonOperatorSymbols\n)\n```\nComparisonExpr.Operator\n\n```go\nfunc (i ComparisonOperatorSymbol) HasSubOperator() bool\n```\nHasSubOperator returns if the ComparisonOperator is used with a sub-operator.\n\n```go\nfunc (i ComparisonOperatorSymbol) String() string\n```\n\n","path":"github.com/cockroachdb/cockroachdb-parser/pkg/sql/sem/tree/treecmp","name":"treecmp","synopsis":"Package treecmp contains the implementation-agnostic information about all comparison operators that we support.","isRedistributable":true}
