package
20.2.19+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
AppendToMaybeNullArray appends an element to an array.
ArrayContains return true if the haystack contains all needles.
ArrayOfFirstNonNullReturnType returns an array type from the first non-null type in the argument list.
AsDArray attempts to retrieve a *DArray from an Expr, returning a *DArray and a flag signifying whether the assertion was successful.
AsDBitArray attempts to retrieve a *DBitArray from an Expr, returning a *DBitArray and a flag signifying whether the assertion was successful.
AsDBool attempts to retrieve a *DBool from an Expr, returning a *DBool and a flag signifying whether the assertion was successful.
AsDBox2D attempts to retrieve a *DBox2D from an Expr, returning a *DBox2D and a flag signifying whether the assertion was successful.
AsDBytes attempts to convert an Expr into a DBytes, returning a flag indicating whether it was successful.
AsDGeography attempts to retrieve a *DGeography from an Expr, returning a *DGeography and a flag signifying whether the assertion was successful.
AsDGeometry attempts to retrieve a *DGeometry from an Expr, returning a *DGeometry and a flag signifying whether the assertion was successful.
AsDInt attempts to retrieve a DInt from an Expr, returning a DInt and a flag signifying whether the assertion was successful.
AsDIPAddr attempts to retrieve a *DIPAddr from an Expr, returning a *DIPAddr and a flag signifying whether the assertion was successful.
AsDJSON attempts to retrieve a *DJSON from an Expr, returning a *DJSON and a flag signifying whether the assertion was successful.
AsDOid attempts to retrieve a DOid from an Expr, returning a DOid and a flag signifying whether the assertion was successful.
AsDString attempts to retrieve a DString from an Expr, returning a DString and a flag signifying whether the assertion was successful.
AsDTimestamp attempts to retrieve a DTimestamp from an Expr, returning a DTimestamp and a flag signifying whether the assertion was successful.
AsDTimestampTZ attempts to retrieve a DTimestampTZ from an Expr, returning a DTimestampTZ and a flag signifying whether the assertion was successful.
AsDTuple attempts to retrieve a *DTuple from an Expr, returning a *DTuple and a flag signifying whether the assertion was successful.
AsJSON converts a datum into our standard json representation.
AsString pretty prints a node to a string.
AsStringWithFlags pretty prints a node to a string given specific flags; only flags that don't require Annotations can be used.
AsStringWithFQNames pretty prints a node to a string with the FmtAlwaysQualifyTableNames flag (which requires annotations).
CanModifySchema returns true if the statement can modify the database schema.
CanWriteData returns true if the statement can modify data.
Cbrt returns the cube root of x.
CheckIsWindowOrAgg returns an error if the function definition is not a window function or an aggregate.
CompareBools compares the input bools according to the SQL comparison rules.
CompareDecimals compares 2 apd.Decimals according to the SQL comparison rules, making sure that NaNs sort first.
ComputeColNameInternal is the workhorse for GetRenderColName.
ConcatArrays concatenates two arrays.
ContainsVars returns true if the expression contains any variables.
ConvertLikeToRegexp compiles the specified LIKE pattern as an equivalent regular expression.
DatumToHLC performs the conversion from a Datum to an HLC timestamp.
DatumTypeSize returns a lower bound on the total size of a Datum of the given type in bytes, including memory that is pointed at (even if shared between Datum instances) but excluding allocation overhead.
DecimalCbrt returns the cube root of x.
DecimalSqrt returns the square root of x.
DecimalToHLC performs the conversion from an inputted DECIMAL datum for an AS OF SYSTEM TIME query to an HLC timestamp.
DecimalToInexactDTimestamp is the inverse of TimestampToDecimal.
DefaultPrettyCfg returns a PrettyCfg with the default configuration.
ErrNameString escapes an identifier stored a string to a SQL identifier suitable for printing in error messages.
ErrNameStringP escapes an identifier stored a string to a SQL identifier suitable for printing in error messages, avoiding a heap allocation.
ErrString pretty prints a node to a string.
EvalAsOfTimestamp evaluates the timestamp argument to an AS OF SYSTEM TIME query.
EvalComparisonExprWithSubOperator evaluates a comparison expression that has sub-operator.
ExprDebugString generates a multi-line debug string with one node per line in Go format.
FindEqualComparisonFunction looks up an overload of the "=" operator for a given pair of input operand types.
FirstNonNullReturnType returns the type of the first non-null argument, or types.Unknown if all arguments are null.
FixedReturnType functions simply return a fixed type, independent of argument types.
FoldComparisonExpr folds a given comparison operation and its expressions into an equivalent operation that will hit in the CmpOps map, returning this new operation, along with potentially flipped operands and "flipped" and "not" flags.
GetBool gets DBool or an error (also treats NULL as false, not an error).
GetEnumComponentsFromPhysicalRep returns the physical and logical components for an enum of the requested type.
GetParamsAndReturnType gets the parameters and return type of an overloadImpl.
GetRenderColName computes a name for a result column.
GetStaticallyKnownType possibly promotes a ResolvableTypeReference into a *types.T if the reference is a statically known type.
HasReturningClause determines if a ReturningClause is present, given a variant of the ReturningClause interface.
IdentityReturnType creates a returnType that is a projection of the idx'th argument type.
IntPow computes the value of x^y.
IsConst returns whether the expression is constant.
IsReferenceSerialType returns whether the input reference is a known serial type.
IsStmtParallelized determines if a given statement's execution should be parallelized.
LimitDecimalWidth limits d's precision (total number of digits) and scale (number of digits after the decimal point).
LookupCastVolatility returns the volatility of a valid cast.
MakeAllDEnumsInType generates a slice of all values in an enum.
MakeAnnotations allocates an annotations container of the given size.
MakeColumnItem constructs a column item from an already valid TableName.
MakeConstantEvalVisitor creates a ConstantEvalVisitor instance.
MakeDBitArray returns a DBitArray.
MakeDBool converts its argument to a *DBool, returning either DBoolTrue or DBoolFalse.
MakeDDate makes a DDate from a pgdate.Date.
MakeDEnumFromLogicalRepresentation creates a DEnum of the input type and input logical representation.
MakeDEnumFromPhysicalRepresentation creates a DEnum of the input type and the input physical representation.
MakeDJSON returns a JSON value given a Go-style representation of JSON.
MakeDOid is a helper routine to create a DOid initialized from a DInt.
MakeDTime creates a DTime from a TimeOfDay.
MakeDTimestamp creates a DTimestamp with specified precision.
MakeDTimestampTZ creates a DTimestampTZ with specified precision.
MakeDTimestampTZFromDate creates a DTimestampTZ from a DDate.
MakeExplain parses the EXPLAIN option strings and generates an explain statement.
MakeIndexedVarHelper initializes an IndexedVarHelper structure.
MakeNewQualifiedTypeName creates a fully qualified type name.
MakeNormalizeVisitor creates a NormalizeVisitor instance.
MakeSemaContext initializes a simple SemaContext suitable for "lightweight" type checking such as the one performed for default expressions.
MakeTableName creates a new table name qualified with just a schema.
MakeTableNameFromPrefix creates a table name from an unqualified name and a resolved prefix.
MakeTableNameWithSchema creates a new fully qualified table name.
MakeTestingEvalContext returns an EvalContext that includes a MemoryMonitor.
MakeTestingEvalContextWithMon returns an EvalContext with the given MemoryMonitor.
MakeTestingMapTypeResolver creates a TestingMapTypeResolver from a map.
MakeTypesOnlyIndexedVarHelper creates an IndexedVarHelper which provides the given types for indexed vars.
MakeUnqualifiedTableName creates a new base table name.
MakeUnqualifiedTypeName returns a new type name.
MakeUnresolvedName constructs an UnresolvedName from some strings.
MatchLikeEscape matches 'unescaped' with 'pattern' using custom escape character 'escape' which must be either empty (which disables the escape mechanism) or a single unicode character.
MockNameTypes populates presetTypesForTesting for a test.
MustBeDArray attempts to retrieve a *DArray from an Expr, panicking if the assertion fails.
MustBeDBitArray attempts to retrieve a DBitArray from an Expr, panicking if the assertion fails.
MustBeDBool attempts to retrieve a DBool from an Expr, panicking if the assertion fails.
MustBeDBox2D attempts to retrieve a *DBox2D from an Expr, panicking if the assertion fails.
MustBeDBytes attempts to convert an Expr into a DBytes, panicking if unsuccessful.
MustBeDDecimal attempts to retrieve a DDecimal from an Expr, panicking if the assertion fails.
MustBeDFloat attempts to retrieve a DFloat from an Expr, panicking if the assertion fails.
MustBeDGeography attempts to retrieve a *DGeography from an Expr, panicking if the assertion fails.
MustBeDGeometry attempts to retrieve a *DGeometry from an Expr, panicking if the assertion fails.
MustBeDInt attempts to retrieve a DInt from an Expr, panicking if the assertion fails.
MustBeDInterval attempts to retrieve a DInterval from an Expr, panicking if the assertion fails.
MustBeDIPAddr attempts to retrieve a DIPAddr from an Expr, panicking if the assertion fails.
MustBeDJSON attempts to retrieve a DJSON from an Expr, panicking if the assertion fails.
MustBeDOid attempts to retrieve a DOid from an Expr, panicking if the assertion fails.
MustBeDString attempts to retrieve a DString from an Expr, panicking if the assertion fails.
MustBeDTimestamp attempts to retrieve a DTimestamp from an Expr, panicking if the assertion fails.
MustBeDTimestampTZ attempts to retrieve a DTimestampTZ from an Expr, panicking if the assertion fails.
MustBeDTuple attempts to retrieve a *DTuple from an Expr, panicking if the assertion fails.
MustBeStaticallyKnownType does the same thing as GetStaticallyKnownType but panics in the case that the reference is not statically known.
MustMakeDTimestamp wraps MakeDTimestamp but panics if there is an error.
MustMakeDTimestampTZ wraps MakeDTimestampTZ but panics if there is an error.
NameString escapes an identifier stored in a string to a SQL identifier.
NameStringP escapes an identifier stored in a heap string to a SQL identifier, avoiding a heap allocation.
NewAggInAggError creates an error for the case when an aggregate function is contained within another aggregate function.
NewBytesStrVal constructs a StrVal instance suitable as byte array.
NewCallbackValueGenerator creates a new CallbackValueGenerator.
NewCannotMixBitArraySizesError creates an error for the case when a bitwise aggregate function is called on bit arrays with different sizes.
NewColumnItem constructs a column item from an already valid TableName.
NewColumnTableDef constructs a column definition for a CreateTable statement.
NewContextDependentOpsNotAllowedError creates an error for the case when context-dependent operators are not allowed in the given context.
NewDArray returns a DArray containing elements of the specified type.
NewDBitArray returns a DBitArray.
NewDBitArrayFromInt creates a bit array from the specified integer at the specified width.
NewDBox2D returns a new Box2D Datum.
NewDBytes is a helper routine to create a *DBytes initialized from its argument.
NewDCollatedString is a helper routine to create a *DCollatedString.
NewDDate is a helper routine to create a *DDate initialized from its argument.
NewDDateFromTime constructs a *DDate from a time.Time.
NewDefaultDatum returns a default non-NULL datum value for the given type.
NewDFloat is a helper routine to create a *DFloat initialized from its argument.
NewDGeography returns a new Geography Datum.
NewDGeometry returns a new Geometry Datum.
NewDInt is a helper routine to create a *DInt initialized from its argument.
NewDInterval creates a new DInterval.
NewDIntVectorFromDArray is a helper routine to create a *DIntVector (implemented as a *DOidWrapper) initialized from an existing *DArray.
NewDIPAddr is a helper routine to create a *DIPAddr initialized from its argument.
NewDJSON is a helper routine to create a DJSON initialized from its argument.
NewDName is a helper routine to create a *DName (implemented as a *DOidWrapper) initialized from a string.
NewDNameFromDString is a helper routine to create a *DName (implemented as a *DOidWrapper) initialized from an existing *DString.
NewDOid is a helper routine to create a *DOid initialized from a DInt.
NewDOidVectorFromDArray is a helper routine to create a *DOidVector (implemented as a *DOidWrapper) initialized from an existing *DArray.
NewDOidWithName is a helper routine to create a *DOid initialized from a DInt and a string.
NewDString is a helper routine to create a *DString initialized from its argument.
NewDTimeTZ creates a DTimeTZ from a timetz.TimeTZ.
NewDTimeTZFromLocation creates a DTimeTZ from a TimeOfDay and time.Location.
NewDTimeTZFromOffset creates a DTimeTZ from a TimeOfDay and offset.
NewDTimeTZFromTime creates a DTimeTZ from time.Time.
NewDTuple creates a *DTuple with the provided datums.
NewDTupleWithLen creates a *DTuple with the provided length.
NewDUuid is a helper routine to create a *DUuid initialized from its argument.
NewFmtCtx creates a FmtCtx; only flags that don't require Annotations can be used.
NewFmtCtxEx creates a FmtCtx.
NewFunctionDefinition allocates a function definition corresponding to the given built-in definition.
NewInvalidFunctionUsageError creates a rejection for a special function.
NewInvalidNestedSRFError creates a rejection for a nested SRF.
NewNumVal constructs a new NumVal instance.
NewOrdinalReference is a helper routine to create a standalone IndexedVar with the given index value.
NewParseTimeContext constructs a ParseTimeContext that returns the given values.
NewPlaceholder allocates a Placeholder.
NewQualifiedObjectName returns an ObjectName of the corresponding kind.
NewRegexpCache creates a new RegexpCache of the given size.
NewStrVal constructs a StrVal instance.
NewTableName creates a new table name qualified with a given catalog and the public schema.
NewTestingEvalContext is a convenience version of MakeTestingEvalContext that returns a pointer.
NewTypedAndExpr returns a new AndExpr that is verified to be well-typed.
NewTypedArray returns an Array that is well-typed.
NewTypedArrayFlattenExpr returns a new ArrayFlattenExpr that is verified to be well-typed.
NewTypedBinaryExpr returns a new BinaryExpr that is well-typed.
NewTypedCaseExpr returns a new CaseExpr that is verified to be well-typed.
NewTypedCastExpr returns a new CastExpr that is verified to be well-typed.
NewTypedCoalesceExpr returns a CoalesceExpr that is well-typed.
NewTypedCollateExpr returns a new CollateExpr that is verified to be well-typed.
NewTypedColumnAccessExpr creates a pre-typed ColumnAccessExpr.
NewTypedComparisonExpr returns a new ComparisonExpr that is verified to be well-typed.
NewTypedComparisonExprWithSubOp returns a new ComparisonExpr that is verified to be well-typed.
NewTypedFuncExpr returns a FuncExpr that is already well-typed and resolved.
NewTypedIfErrExpr returns a new IfErrExpr that is verified to be well-typed.
NewTypedIndirectionExpr returns a new IndirectionExpr that is verified to be well-typed.
NewTypedIsNotNullExpr returns a new IsNotNullExpr that is verified to be well-typed.
NewTypedIsNullExpr returns a new IsNullExpr that is verified to be well-typed.
NewTypedNotExpr returns a new NotExpr that is verified to be well-typed.
NewTypedOrdinalReference returns a new IndexedVar with the given index value that is verified to be well-typed.
NewTypedOrExpr returns a new OrExpr that is verified to be well-typed.
NewTypedTuple returns a new Tuple that is verified to be well-typed.
NewTypedUnaryExpr returns a new UnaryExpr that is well-typed.
NewTypeIsNotCompositeError generates an error suitable to report when a ColumnAccessExpr or TupleStar is applied to a non-composite type.
NewUnqualifiedTableName creates a new base table name.
NewUnqualifiedTypeName returns a new base type name.
NewUnresolvedName constructs an UnresolvedName from some strings.
NewUnresolvedObjectName creates an unresolved object name, verifying that it is well-formed.
NewWhere creates a WHERE or HAVING clause out of an Expr.
ObjectLookupFlagsWithRequired returns a default ObjectLookupFlags object with just the Required flag true.
ObjectLookupFlagsWithRequiredTableKind returns an ObjectLookupFlags with Required set to true, and the DesiredTableDescKind set to the input kind.
OverrideWindowDef implements the logic to have a base window definition which then gets augmented by a different window definition.
ParseAndRequireString parses s as type t for simple types.
ParseDArrayFromString parses the string-form of constructing arrays, handling cases such as `'{1,2,3}'::INT[]`.
ParseDBitArray parses a string representation of binary digits.
ParseDBool parses and returns the *DBool Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDBox2D attempts to pass `str` as a Box2D type.
ParseDByte parses a string representation of hex encoded binary data.
ParseDDate parses and returns the *DDate Datum value represented by the provided string in the provided location, or an error if parsing is unsuccessful.
ParseDDecimal parses and returns the *DDecimal Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDFloat parses and returns the *DFloat Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDGeography attempts to pass `str` as a Geography type.
ParseDGeometry attempts to pass `str` as a Geometry type.
ParseDInt parses and returns the *DInt Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDInterval parses and returns the *DInterval Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDIntervalWithTypeMetadata is like ParseDInterval, but it also takes a types.IntervalTypeMetadata that both specifies the units for unitless, numeric intervals and also specifies the precision of the interval.
ParseDIPAddrFromINetString parses and returns the *DIPAddr Datum value represented by the provided input INet string, or an error.
ParseDJSON takes a string of JSON and returns a DJSON value.
ParseDTime parses and returns the *DTime Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDTimestamp parses and returns the *DTimestamp Datum value represented by the provided string in UTC, or an error if parsing is unsuccessful.
ParseDTimestampTZ parses and returns the *DTimestampTZ Datum value represented by the provided string in the provided location, or an error if parsing is unsuccessful.
ParseDTimeTZ parses and returns the *DTime Datum value represented by the provided string, or an error if parsing is unsuccessful.
ParseDUuidFromBytes parses and returns the *DUuid Datum value represented by the provided input bytes, or an error.
ParseDUuidFromString parses and returns the *DUuid Datum value represented by the provided input string, or an error.
PerformCast performs a cast from the provided Datum to the specified types.T.
PickFromTuple picks the greatest (or least value) from a tuple.
PrependToMaybeNullArray prepends an element in the front of an arrray.
Pretty pretty prints stmt with default options.
ProcessPlaceholderAnnotations performs an order-independent global traversal of the provided Statement, annotating all placeholders with a type in either of the following situations:
- the placeholder is the subject of an explicit type annotation in at least one of its occurrences.
ResolveExisting performs name resolution for an object name when the target object is expected to exist already.
ResolveTarget performs name resolution for an object name when the target object is not expected to exist already.
ResolveType converts a ResolvableTypeReference into a *types.T.
ReType ensures that the given numeric expression evaluates to the requested type, inserting a cast if necessary.
SampleDatum is intended to be a more lightweight version of RandDatum for when you just need one consistent example of a datum.
Serialize pretty prints a node to a string using FmtSerializable; it is appropriate when we store expressions into strings that are stored on disk and may be later parsed back into expressions.
SerializeForDisplay pretty prints a node to a string using FmtParsable.
SimilarEscape converts a SQL:2008 regexp pattern to POSIX style, so it can be used by our regexp engine.
SimilarToEscape checks if 'unescaped' is SIMILAR TO 'pattern' using custom escape token 'escape' which must be either empty (which disables the escape mechanism) or a single unicode character.
SimpleVisit is a convenience wrapper for visitors that only have VisitPre code and don't return any results except an error.
SizeOfDecimal returns the size in bytes of an apd.Decimal.
Sqrt returns the square root of x.
StarExpr is a convenience function that represents an unqualified "*".
StarSelectExpr is a convenience function that represents an unqualified "*" in a select expression.
StmtDebugString generates multi-line debug strings in Go format for the expressions that are part of the given statement.
StripMemoizedFuncs strips memoized function references from expression trees.
StripParens strips any parentheses surrounding an expression and returns the inner expression.
StripTableParens strips any parentheses surrounding a selection clause.
TimeFamilyPrecisionToRoundDuration takes in a type's precision, and returns the duration to use to pass into time.Truncate to truncate to that duration.
TimestampToDecimal converts the logical timestamp into a decimal value with the number of nanoseconds in the integer part and the logical counter in the decimal part.
TimestampToDecimalDatum is the same as TimestampToDecimal, but returns a datum.
TimestampToInexactDTimestamp converts the logical timestamp into an inexact DTimestamp by dropping the logical counter and using the wall time at the microsecond precision.
TypeCheck performs type checking on the provided expression tree, returning the new typed expression tree, which additionally permits evaluation and type introspection globally and on each sub-tree.
TypeCheckAndRequire performs type checking on the provided expression tree in an identical manner to TypeCheck.
TypeCheckSameTypedExprs type checks a list of expressions, asserting that all resolved TypeExprs have the same type.
UnwrapDatum returns the base Datum type for a provided datum, stripping an *DOidWrapper if present.
UserPriorityFromString converts a string into a UserPriority.
VolatilityFromPostgres returns a Volatility that matches the postgres provolatile/proleakproof settings.
WalkExpr traverses the nodes in an expression.
WalkExprConst is a variant of WalkExpr for visitors that do not modify the expression.
WindowModeName returns the name of the window frame mode.
WrapFunction creates a new ResolvableFunctionReference holding a pre-resolved function.
# Constants
Ack indicates that the statement does not have a meaningful return.
ActiveSchedules indicates that show schedules should only show those schedules that are currently active.
AggregateClass is a builtin aggregate function.
ComparisonExpr.Operator.
AllDescriptors table coverage means that backup is guaranteed to have all the relevant data in the cluster.
FuncExpr.Type.
These constants separate the syntax X:::Y from ANNOTATE_TYPE(X, Y).
These constants separate the syntax X:::Y from ANNOTATE_TYPE(X, Y).
The following operators will always be used with an associated SubOperator.
Direction values.
JoinTableExpr.Join.
JoinTableExpr.Join.
JoinTableExpr.Hint.
Where.Type.
JoinTableExpr.Join.
JoinTableExpr.Join.
JoinTableExpr.Hint.
JoinTableExpr.Hint.
JoinTableExpr.Join.
Where.Type.
AuditModeDisable is the default mode - no audit.
AuditModeReadWrite enables audit on read or write statements.
BackupDefaultDetails identifies a bare SHOW BACKUP statement.
BackupFileDetails identifies a SHOW BACKUP FILES statement.
BackupRangeDetails identifies a SHOW BACKUP RANGES statement.
Base represents a base user defined type.
BinaryExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
JobCommand values.
The values for ReferenceAction.
These constants separate the syntax X::Y from CAST(X AS Y).
These constants separate the syntax X::Y from CAST(X AS Y).
These constants separate the syntax X::Y from CAST(X AS Y).
Composite represents a composite user defined type.
BinaryExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
Valid values for CopyFormat.
Valid values for CopyFormat.
CopyIn indicates a COPY FROM statement.
CreateTableOnCommitPreserveRows indicates that ON COMMIT PRESERVE ROWS was set.
CreateTableOnCommitUnset indicates that ON COMMIT was unset.
CurrentRow represents CURRENT ROW type of boundary.
DDL indicates that the statement mutates the database schema.
Direction values.
Null order values.
DeferrableMode values.
Direction values.
DiscardModeAll represents a DISCARD ALL statement.
FuncExpr.Type.
BinaryExpr.Operator.
Domain represents a DOMAIN user defined type.
DropBehavior values.
DropBehavior values.
DropBehavior values.
ScheduleCommand values.
Enum represents an ENUM user defined type.
ComparisonExpr.Operator.
ExactlyOne indicates just one source matching the requested name.
Union.Type.
ExcludeCurrentRow represents EXCLUDE CURRENT ROW mode of frame exclusion.
ExcludeGroup represents EXCLUDE GROUP mode of frame exclusion.
ExcludeTies represents EXCLUDE TIES mode of frame exclusion.
ExplainDistSQL shows the physical distsql plan for a query and whether a query would be run in "auto" DISTSQL mode.
Explain flags.
Explain flags.
Explain flags.
Explain flags.
Explain flags.
Explain flags.
Explain flags.
ExplainOpt shows the optimized relational expression (from the cost-based optimizer).
ExplainPlan shows information about the planNode tree for a query.
ExplainVec shows the physical vectorized plan for a query and whether a query would be run in "auto" vectorized mode.
BinaryExpr.Operator.
FmtAlwaysGroupExprs instructs the pretty-printer to enclose sub-expressions between parentheses.
FmtAlwaysQualifyTableNames instructs the pretty-printer to qualify table names, even if originally omitted.
FmtAnonymize instructs the pretty-printer to remove any name but function names.
FmtArrayToString is a special composite flag suitable for the output of array_to_string().
FmtBareIdentifiers instructs the pretty-printer to print identifiers without wrapping quotes in any case.
FmtBareStrings instructs the pretty-printer to print strings and other values without wrapping quotes.
FmtCheckEquivalence instructs the pretty-printer to produce a representation that can be used to check equivalence of expressions.
FmtExport, if set, formats datums in a raw form suitable for EXPORT, e.g.
FmtHideConstants instructs the pretty-printer to produce a representation that does not disclose query-specific data.
FmtParsable instructs the pretty-printer to produce a representation that can be parsed into an equivalent expression.
FmtParsableNumerics produces decimal and float representations that are always parsable, even if they require a string representation like -Inf.
FmtPGCatalog is used to produce expressions formatted in a way that's as close as possible to what clients expect to live in pg_catalog (e.g.
FmtPgwireText instructs the pretty-printer to use a pg-compatible conversion to strings.
FmtSerializable instructs the pretty-printer to produce a representation for expressions that can be serialized to disk.
FmtShowPasswords instructs the pretty-printer to not suppress passwords.
FmtShowTableAliases reveals the table aliases.
FmtShowTypes instructs the pretty-printer to annotate expressions with their resolved types.
FmtSimple instructs the pretty-printer to produce a straightforward representation.
FmtSymbolicSubqueries indicates that subqueries must be pretty-printed using numeric notation (@S123).
FollowerReadTimestampExperimentalFunctionName is the name of the old "experimental_" function, which we keep for backwards compatibility.
FollowerReadTimestampFunctionName is the name of the function which can be used with AOST clauses to generate a timestamp likely to be safe for follower reads.
ForKeyShare represents FOR KEY SHARE.
ForNoKeyUpdate represents FOR NO KEY UPDATE.
ForNone represents the default - no for statement at all.
ForShare represents FOR SHARE.
ForUpdate represents FOR UPDATE.
ComparisonExpr.Operator.
GeneralAgg is used for general-purpose aggregate functions.
GeneratorClass is a builtin generator function.
GROUPS is the mode of specifying frame in terms of peer groups.
ComparisonExpr.Operator.
UserPriority values.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
Union.Type.
InvalidExecutor is a placeholder for an invalid executor type.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
LikeTableOptAll is the full LikeTableOpt bitmap.
The values for LikeTableOpt.
The values for LikeTableOpt.
The values for LikeTableOpt.
The values for LikeTableOpt.
LockWaitBlock represents the default - wait for the lock to become available.
LockWaitError represents NOWAIT - raise an error if a row cannot be locked.
LockWaitSkip represents SKIP LOCKED - skip rows that can't be locked.
UserPriority values.
BinaryExpr.Operator.
ComparisonExpr.Operator.
The values for CompositeKeyMatchMethod.
Note: PARTIAL not actually supported at this point.
The values for CompositeKeyMatchMethod.
MaxPlaceholderIdx is the maximum allowed value of a PlaceholderIdx.
BinaryExpr.Operator.
BinaryExpr.Operator.
MoreThanOne signals an ambiguous match.
BinaryExpr.Operator.
ComparisonExpr.Operator.
The values for ReferenceAction.
NoAnnotation is the uninitialized annotation index.
NoColumnIdx is a special value that can be used as a "column index" to indicate that the column is not present.
NoExclusion represents an omitted frame exclusion clause.
NoResults for when there is no result.
UserPriority values.
NormalClass is a standard builtin function.
DeferrableMode values.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
The values for NullType.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
The values for NullType.
Null order values.
Null order values.
BinaryExpr.Operator.
ComparisonExpr.Operator.
UnaryExpr.Operator.
OffsetFollowing represents 'value' FOLLOWING type of boundary.
OffsetPreceding represents 'value' PRECEDING type of boundary.
OrderByColumn is the regular "by expression/column" ORDER BY specification.
OrderByIndex enables the user to specify a given index' columns implicitly.
OrderedSetAgg is used for ordered-set aggregate functions.
ComparisonExpr.Operator.
PartitionByList indicates a PARTITION BY LIST clause.
PartitionByRange indicates a PARTITION BY LIST clause.
PausedSchedules indicates that show schedules should only show those schedules that are currently paused.
JobCommand values.
ScheduleCommand values.
PersistencePermanent indicates a permanent table.
PersistenceTemporary indicates a temporary table.
PersistenceUnlogged indicates an unlogged table.
BinaryExpr.Operator.
BinaryExpr.Operator.
PrettyAlignAndDeindent does the work of PrettyAlignOnly and also de-indents AND and OR operators.
PrettyAlignAndExtraIndent does the work of PrettyAlignOnly and also extra indents the operands of AND and OR operators so that they appear aligned but also indented.
PrettyAlignOnly aligns sub-clauses only and preserves the hierarchy of logical operators.
PrettyNoAlign disables alignment.
PublicSchema is the name of the physical schema in every database/catalog.
PublicSchemaName is the same, typed as Name.
Range represents a RANGE user defined type.
RANGE is the mode of specifying frame in terms of logical range (e.g.
ReadWriteMode values.
ReadWriteMode values.
RefreshDataClear refers to the WITH NO DATA option provided to the REFRESH MATERIALIZED VIEW statement.
RefreshDataDefault refers to no option provided to the REFRESH MATERIALIZED VIEW statement.
RefreshDataWithData refers to the WITH DATA option provided to the REFRESH MATERIALIZED VIEW statement.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
RejectAggregates rejects min(), max(), etc.
RejectGenerators rejects any use of SRFs, e.g "generate_series()".
RejectNestedAggregates rejects any use of aggregates inside the argument list of another function call, which can itself be an aggregate (RejectAggregates notwithstanding).
RejectNestedGenerators rejects any use of SRFs inside the argument list of another function call, which can itself be a SRF (RejectGenerators notwithstanding).
RejectNestedWindows rejects any use of window functions inside the argument list of another window function.
RejectSpecial is used in common places like the LIMIT clause.
RejectStableOperators rejects any stable functions or operators (including casts).
RejectSubqueries rejects subqueries in scalar contexts.
RejectVolatileFunctions rejects any volatile functions.
RejectWindowApplications rejects "x() over y", etc.
RequestedDescriptors table coverage means that the backup is not guaranteed to have all of the cluster data.
RequiredTableKind options have descriptive names.
RequiredTableKind options have descriptive names.
RequiredTableKind options have descriptive names.
RequiredTableKind options have descriptive names.
RequiredTableKind options have descriptive names.
The values for ReferenceAction.
JobCommand values.
ScheduleCommand values.
Rows indicates that the statement returns the affected rows after the statement was applied.
ROWS is the mode of specifying frame in terms of physical offsets (e.g.
RowsAffected indicates that the statement returns the count of affected rows.
BinaryExpr.Operator.
ScheduledBackupExecutor is an executor responsible for the execution of the scheduled backups.
ScrubDatabase describes the SCRUB operation SCRUB DATABASE.
ScrubTable describes the SCRUB operation SCRUB TABLE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
Names of options on CREATE SEQUENCE.
IsolationLevel values.
The values for ReferenceAction.
The values for ReferenceAction.
Shell represents a shell user defined type.
A list of the SHOW TRACE variants.
A list of the SHOW TRACE variants.
A list of the SHOW TRACE variants.
The values for NullType.
ComparisonExpr.Operator.
SizeOfDatum is the memory size of a Datum reference.
SizeOfDatums is the memory size of a Datum slice.
ComparisonExpr.Operator.
SpecifiedSchedules indicates that show schedules should only show subset of schedules.
SQLClass is a builtin function that executes a SQL statement as a side effect of the function call.
Keep this list alphabetized so that it is easy to manage.
TableObject is used when a table-like object is desired from resolution.
TimestampOutputFormat is used to output all Timestamps.
TimestampTZOutputFormat is used to output all TimestampTZs.
TypeObject is used when a type-like object is desired from resolution.
UnaryExpr.Operator.
UnaryExpr.Operator.
UnaryExpr.Operator.
UnaryExpr.Operator.
UnboundedFollowing represents UNBOUNDED FOLLOWING type of boundary.
UnboundedPreceding represents UNBOUNDED PRECEDING type of boundary.
Union.Type.
Unknown indicates that the statement does not have a known return style at the time of parsing.
DeferrableMode values.
IsolationLevel values.
ReadWriteMode values.
UserPriority values.
ValidationDefault is the default validation behavior (immediate).
ValidationSkip skips validation of any existing data.
VolatilityImmutable means that the operator cannot modify the database, the transaction state, or any other state.
VolatilityLeakProof means that the operator cannot modify the database, the transaction state, or any other state.
VolatilityStable means that the operator cannot modify the database or the transaction state and is guaranteed to return the same results given the same arguments whenever it is evaluated within the same statement.
VolatilityVolatile means that the operator can do anything, including modifying database state.
WindowClass is a builtin window function.
# Variables
AbsentReturningClause is a ReturningClause variant representing the absence of a RETURNING clause.
BinOps contains the binary operations indexed by operation type.
CmpOps contains the comparison operations indexed by operation type.
DBoolFalse is a pointer to the DBool(false) value and can be used in comparisons against Datum types.
DBoolTrue is a pointer to the DBool(true) value and can be used in comparisons against Datum types.
DecimalCtx is the default context for decimal operations.
DecimalOne represents the constant 1 as DECIMAL.
DMaxIPAddr is the max DIPaddr.
DMaxTimeTZ is the max TimeTZ.
DMaxUUID is the max UUID.
DMinIPAddr is the min DIPAddr.
DMinTimeTZ is the min TimeTZ.
DMinUUID is the min UUID.
DNull is the NULL Datum.
DTimeMaxTimeRegex is a compiled regex for parsing the 24:00 time value.
DZero is the zero-valued integer Datum.
ErrAsOfSpecifiedWithReadWrite is returned when a statement attempts to set a historical query to READ WRITE which conflicts with its implied READ ONLY mode.
ErrDivByZero is reported on a division by zero.
ErrFloatOutOfRange is reported when float arithmetic overflows.
ErrIntOutOfRange is reported when integer arithmetic overflows.
ErrShiftArgOutOfRange is reported when a shift argument is out of range.
ExactCtx is a decimal context with exact precision.
FunDefs holds pre-allocated FunctionDefinition instances for every builtin function.
HighPrecisionCtx is a decimal context with high precision.
IntermediateCtx is a decimal context with additional precision for intermediate calculations to protect against order changes that can happen in dist SQL.
IsolationLevelMap is a map from string isolation level name to isolation level, in the lowercase format that set isolation_level supports.
JobCommandToStatement translates a job command integer to a statement prefix.
294276-12-31 23:59:59.999999.
4714-11-24 00:00:00+00 BC.
NumValAvailDecimalNoFraction is the set of available integral numeric types.
NumValAvailDecimalWithFraction is the set of available fractional numeric types.
NumValAvailInteger is the set of available integer types.
ReturningNothingClause is a shared instance to avoid unnecessary allocations.
RoundCtx is a decimal context with high precision and RoundHalfEven rounding.
StrValAvailAllParsable is the set of parsable string types.
StrValAvailBytes is the set of types convertible to byte array.
UnaryOps contains the unary operations indexed by operation type.
UnknownReturnType is returned from ReturnTypers when the arguments provided are not sufficient to determine a return type.
# Structs
AliasClause represents an alias, optionally with a column list: "AS name" or "AS name(col1, col2)".
AliasedTableExpr represents a table expression coupled with an optional alias.
AllColumnsSelector corresponds to a selection of all columns in a table when used in a SELECT clause.
AllTablesSelector corresponds to a selection of all tables in a database, e.g.
AlterDatabaseOwner represents a ALTER DATABASE OWNER TO statement.
AlterIndex represents an ALTER INDEX statement.
AlterIndexPartitionBy represents an ALTER INDEX PARTITION BY command.
AlterRole represents an ALTER ROLE statement.
AlterSchema represents an ALTER SCHEMA statement.
AlterSchemaOwner represents an ALTER SCHEMA OWNER TO command.
AlterSchemaRename represents an ALTER SCHEMA RENAME command.
AlterSequence represents an ALTER SEQUENCE statement, except in the case of ALTER SEQUENCE <seqName> RENAME TO <newSeqName>, which is represented by a RenameTable node.
AlterTable represents an ALTER TABLE statement.
AlterTableAddColumn represents an ADD COLUMN command.
AlterTableAddConstraint represents an ADD CONSTRAINT command.
AlterTableAlterColumnType represents an ALTER TABLE ALTER COLUMN TYPE command.
AlterTableAlterPrimaryKey represents an ALTER TABLE ALTER PRIMARY KEY command.
AlterTableDropColumn represents a DROP COLUMN command.
AlterTableDropConstraint represents a DROP CONSTRAINT command.
AlterTableDropNotNull represents an ALTER COLUMN DROP NOT NULL command.
AlterTableDropStored represents an ALTER COLUMN DROP STORED command to remove the computed-ness from a column.
AlterTableInjectStats represents an ALTER TABLE INJECT STATISTICS statement.
AlterTableOwner represents an ALTER TABLE OWNER TO command.
AlterTablePartitionBy represents an ALTER TABLE PARTITION BY command.
AlterTableRenameColumn represents an ALTER TABLE RENAME [COLUMN] command.
AlterTableRenameConstraint represents an ALTER TABLE RENAME CONSTRAINT command.
AlterTableSetAudit represents an ALTER TABLE AUDIT SET statement.
AlterTableSetDefault represents an ALTER COLUMN SET DEFAULT or DROP DEFAULT command.
AlterTableSetNotNull represents an ALTER COLUMN SET NOT NULL command.
AlterTableSetSchema represents an ALTER TABLE SET SCHEMA command.
AlterTableValidateConstraint represents a VALIDATE CONSTRAINT command.
AlterType represents an ALTER TYPE statement.
AlterTypeAddValue represents an ALTER TYPE ADD VALUE command.
AlterTypeAddValuePlacement represents the placement clause for an ALTER TYPE ADD VALUE command ([BEFORE | AFTER] value).
AlterTypeOwner represents an ALTER TYPE OWNER TO command.
AlterTypeRename represents an ALTER TYPE RENAME command.
AlterTypeRenameValue represents an ALTER TYPE RENAME VALUE command.
AlterTypeSetSchema represents an ALTER TYPE SET SCHEMA command.
Analyze represents an ANALYZE statement.
AndExpr represents an AND expression.
AnnotatedNode is embedded in AST nodes that have an annotation.
AnnotateTypeExpr represents a ANNOTATE_TYPE(expr, type) expression.
Array represents an array constructor.
ArrayFlatten represents a subquery array constructor.
ArraySubscript corresponds to the syntax `<name>[ ..
ArrayTypeReference represents an array of possibly unknown type references.
AsOfClause represents an as of time.
Backup represents a BACKUP statement.
BackupOptions describes options for the BACKUP execution.
BeginTransaction represents a BEGIN statement.
BinaryExpr represents a binary value expression.
BinOp is a binary operator.
CallbackValueGenerator is a ValueGenerator that calls a supplied callback for producing the values.
CancelQueries represents a CANCEL QUERIES statement.
CancelSessions represents a CANCEL SESSIONS statement.
CannedOptPlan is used as the AST for a PREPARE .
CaseExpr represents a CASE expression.
CastExpr represents a CAST(expr AS type) expression.
CheckConstraintTableDef represents a check constraint within a CREATE TABLE statement.
CmpOp is a comparison operator.
CoalesceExpr represents a COALESCE or IFNULL expression.
CollateExpr represents an (expr COLLATE locale) expression.
CollationEnvironment stores the state needed by NewDCollatedString to construct collation keys efficiently.
ColumnAccessExpr represents (E).x expressions.
ColumnCheckConstraint represents either a check on a column.
ColumnComputedDef represents the description of a computed column.
ColumnDefault represents a DEFAULT clause for a column.
ColumnFamilyConstraint represents FAMILY on a column.
ColumnFKConstraint represents a FK-constaint on a column.
ColumnItem corresponds to the name of a column in an expression.
ColumnTableDef represents a column definition within a CREATE TABLE statement.
ColumnTableDefCheckExpr represents a check constraint on a column definition within a CREATE TABLE statement.
CommentOnColumn represents an COMMENT ON COLUMN statement.
CommentOnDatabase represents an COMMENT ON DATABASE statement.
CommentOnIndex represents a COMMENT ON INDEX statement.
CommentOnTable represents an COMMENT ON TABLE statement.
CommitTransaction represents a COMMIT statement.
CommonLookupFlags is the common set of flags for the various accessor interfaces.
ComparisonExpr represents a two-value comparison expression.
ConstantEvalVisitor replaces constant TypedExprs with the result of Eval.
ControlJobs represents a PAUSE/RESUME/CANCEL JOBS statement.
ControlJobsForSchedules represents PAUSE/RESUME/CANCEL clause which applies job command to the jobs matching specified schedule(s).
ControlSchedules represents PAUSE/RESUME SCHEDULE statement.
CopyFrom represents a COPY FROM statement.
CopyOptions describes options for COPY execution.
CreateChangefeed represents a CREATE CHANGEFEED statement.
CreateDatabase represents a CREATE DATABASE statement.
CreateExtension represents a CREATE EXTENSION statement.
CreateIndex represents a CREATE INDEX statement.
CreateRole represents a CREATE ROLE statement.
CreateSchema represents a CREATE SCHEMA statement.
CreateSequence represents a CREATE SEQUENCE statement.
CreateStats represents a CREATE STATISTICS statement.
CreateStatsOptions contains options for CREATE STATISTICS.
CreateTable represents a CREATE TABLE statement.
CreateType represents a CREATE TYPE statement.
CreateView represents a CREATE VIEW statement.
CTE represents a common table expression inside of a WITH clause.
DArray is the array Datum.
DatabaseListFlags is the flag struct suitable for GetObjectNames().
DBitArray is the BIT/VARBIT Datum.
DBox2D is the Datum representation of the Box2D type.
DCollatedString is the Datum for strings with a locale.
DDate is the date Datum represented as the number of days after the Unix epoch.
DDecimal is the decimal Datum.
Deallocate represents a DEALLOCATE statement.
DefaultVal represents the DEFAULT expression.
Delete represents a DELETE statement.
DEnum represents an ENUM value.
DGeography is the Geometry Datum.
DGeometry is the Geometry Datum.
DInterval is the interval Datum.
DIPAddr is the IPAddr Datum.
Discard represents a DISCARD statement.
DJSON is the JSON Datum.
DOid is the Postgres OID datum.
DOidWrapper is a Datum implementation which is a wrapper around a Datum, allowing custom Oid values to be attached to the Datum and its types.T.
DropDatabase represents a DROP DATABASE statement.
DropIndex represents a DROP INDEX statement.
DropRole represents a DROP ROLE statement.
DropSchema represents a DROP SCHEMA command.
DropSequence represents a DROP SEQUENCE statement.
DropTable represents a DROP TABLE statement.
DropType represents a DROP TYPE command.
DropView represents a DROP VIEW statement.
DTimestamp is the timestamp Datum.
DTimestampTZ is the timestamp Datum that is rendered with session offset.
DTimeTZ is the time with time zone Datum.
DTuple is the tuple Datum.
DUuid is the UUID Datum.
EvalContext defines the context in which to evaluate an expression, allowing the retrieval of state such as the node ID or statement start time.
EvalContextTestingKnobs contains test knobs.
Execute represents an EXECUTE statement.
Explain represents an EXPLAIN statement.
ExplainAnalyzeDebug represents an EXPLAIN ANALYZE (DEBUG) statement.
ExplainOptions contains information about the options passed to an EXPLAIN statement.
Export represents a EXPORT statement.
FamilyTableDef represents a family definition within a CREATE TABLE statement.
FmtCtx is suitable for passing to Format() methods.
ForeignKeyConstraintTableDef represents a FOREIGN KEY constraint in the AST.
From represents a FROM clause.
FullBackupClause describes the frequency of full backups.
FuncExpr represents a function call.
FunctionDefinition implements a reference to the (possibly several) overloads for a built-in function.
FunctionProperties defines the properties of the built-in functions that are common across all overloads.
Grant represents a GRANT statement.
GrantRole represents a GRANT <role> statement.
HomogeneousType is a TypeList implementation that accepts any arguments, as long as all are the same type or NULL.
IfErrExpr represents an IFERROR expression.
IfExpr represents an IF expression.
Import represents a IMPORT statement.
IndexedVar is a VariableExpr that can be used as a leaf in expressions; it represents a dynamic value.
IndexedVarHelper wraps an IndexedVarContainer (an interface) and creates IndexedVars bound to that container.
IndexElem represents a column with a direction in a CREATE INDEX statement.
IndexFlags represents "@<index_name|index_id>" or "@{param[,param]}" where param is one of: - FORCE_INDEX=<index_name|index_id> - ASC / DESC - NO_INDEX_JOIN - IGNORE_FOREIGN_KEYS It is used optionally after a table name in SELECT statements.
IndexTableDef represents an index definition within a CREATE TABLE statement.
IndirectionExpr represents a subscript expression.
Insert represents an INSERT statement.
InterleaveDef represents an interleave definition within a CREATE TABLE or CREATE INDEX statement.
IsNotNullExpr represents an IS NOT NULL expression.
IsNullExpr represents an IS NULL expression.
IsOfTypeExpr represents an IS {,NOT} OF (type_list) expression.
JoinTableExpr represents a TableExpr that's a JOIN operation.
KVOption is a key-value option.
LikeTableDef represents a LIKE table declaration on a CREATE TABLE statement.
LikeTableOption represents an individual INCLUDING / EXCLUDING statement on a LIKE table declaration.
Limit represents a LIMIT clause.
ListPartition represents a PARTITION definition within a PARTITION BY LIST.
LockingItem represents a single locking item in a locking clause.
MaterializeClause represents a materialize clause inside of a WITH clause.
MultipleResultsError is returned by QueryRow when more than one result is encountered.
NamedColumnQualification wraps a NamedColumnQualification with a name.
NaturalJoinCond represents a NATURAL join condition.
NoReturningClause represents the absence of a RETURNING clause.
NormalizeVisitor supports the execution of NormalizeExpr.
NotExpr represents a NOT expression.
NotNullConstraint represents NOT NULL on a column.
NullConstraint represents NULL on a column.
NullIfExpr represents a NULLIF expression.
NumVal represents a constant numeric value.
ObjectLookupFlags is the flag struct suitable for GetObjectDesc().
ObjectNamePrefix corresponds to the path prefix of an object name.
OIDTypeReference is a reference to a type directly by its stable ID.
OnConflict represents an `ON CONFLICT (columns) WHERE arbiter DO UPDATE SET exprs WHERE where` clause.
OnJoinCond represents an ON join condition.
Order represents an ordering expression.
OrExpr represents an OR expression.
Overload is one of the overloads of a built-in function.
ParenExpr represents a parenthesized expression.
ParenSelect represents a parenthesized SELECT/UNION/VALUES statement.
ParenTableExpr represents a parenthesized TableExpr.
PartitionBy represents an PARTITION BY definition within a CREATE/ALTER TABLE/INDEX statement.
PartitionMaxVal represents the MAXVALUE expression.
PartitionMinVal represents the MINVALUE expression.
PeerGroupsIndicesHelper computes peer groups using the given PeerGroupChecker.
Placeholder represents a named placeholder.
PlaceholderInfo defines the interface to SQL placeholders.
PlaceholderTypesInfo encapsulates typing information for placeholders.
Prepare represents a PREPARE statement.
PrettyCfg holds configuration for pretty printing statements.
PrimaryKeyConstraint represents PRIMARY KEY on a column.
RangeCond represents a BETWEEN [SYMMETRIC] or a NOT BETWEEN [SYMMETRIC] expression.
RangePartition represents a PARTITION definition within a PARTITION BY RANGE.
ReferenceActions contains the actions specified to maintain referential integrity through foreign keys for different operations.
RefreshMaterializedView represents a REFRESH MATERIALIZED VIEW statement.
A RegexpCache is a cache used to store compiled regular expressions.
ReleaseSavepoint represents a RELEASE SAVEPOINT <name> statement.
Relocate represents an `ALTER TABLE/INDEX .
RenameColumn represents a RENAME COLUMN statement.
RenameDatabase represents a RENAME DATABASE statement.
RenameIndex represents a RENAME INDEX statement.
RenameTable represents a RENAME TABLE or RENAME VIEW or RENAME SEQUENCE statement.
ReparentDatabase represents a database reparenting as a schema operation.
ResolvableFunctionReference implements the editable reference cell of a FuncExpr.
Restore represents a RESTORE statement.
RestoreOptions describes options for the RESTORE execution.
ReturningNothing represents RETURNING NOTHING.
Revoke represents a REVOKE statement.
RevokeRole represents a REVOKE <role> statement.
RollbackToSavepoint represents a ROLLBACK TO SAVEPOINT <name> statement.
RollbackTransaction represents a ROLLBACK statement.
RowsFromExpr represents a ROWS FROM(...) expression.
Savepoint represents a SAVEPOINT <name> statement.
ScalarProperties contains the properties of the current scalar expression discovered during semantic analysis.
Scatter represents an `ALTER TABLE/INDEX .
ScheduledBackup represents scheduled backup job.
Scrub represents a SCRUB statement.
ScrubOptionConstraint represents a CONSTRAINT scrub check.
ScrubOptionIndex represents an INDEX scrub check.
ScrubOptionPhysical represents a PHYSICAL scrub check.
Select represents a SelectStatement with an ORDER and/or LIMIT.
SelectClause represents a SELECT statement.
SelectExpr represents a SELECT expression.
SemaContext defines the context in which to perform semantic analysis on an expression syntax tree.
SemaProperties is a holder for required and derived properties during semantic analysis.
SequenceOption represents an option on a CREATE SEQUENCE statement.
SetClusterSetting represents a SET CLUSTER SETTING statement.
SetSessionAuthorizationDefault represents a SET SESSION AUTHORIZATION DEFAULT statement.
SetSessionCharacteristics represents a SET SESSION CHARACTERISTICS AS TRANSACTION statement.
SetTracing represents a SET TRACING statement.
SetTransaction represents a SET TRANSACTION statement.
SetVar represents a SET or RESET statement.
SetZoneConfig represents an ALTER DATABASE/TABLE..
ShardedIndexDef represents a hash sharded secondary index definition within a CREATE TABLE or CREATE INDEX statement.
ShardedPrimaryKeyConstraint represents `PRIMARY KEY .
ShowBackup represents a SHOW BACKUP statement.
ShowClusterSetting represents a SHOW CLUSTER SETTING statement.
ShowClusterSettingList represents a SHOW [ALL|PUBLIC] CLUSTER SETTINGS statement.
ShowColumns represents a SHOW COLUMNS statement.
ShowConstraints represents a SHOW CONSTRAINTS statement.
ShowCreate represents a SHOW CREATE statement.
ShowDatabaseIndexes represents a SHOW INDEXES FROM DATABASE statement.
ShowDatabases represents a SHOW DATABASES statement.
ShowEnums represents a SHOW ENUMS statement.
ShowFingerprints represents a SHOW EXPERIMENTAL_FINGERPRINTS statement.
ShowGrants represents a SHOW GRANTS statement.
ShowHistogram represents a SHOW HISTOGRAM statement.
ShowIndexes represents a SHOW INDEX statement.
ShowJobs represents a SHOW JOBS statement.
ShowLastQueryStatistics represents a SHOW LAST QUERY STATS statement.
ShowPartitions represents a SHOW PARTITIONS statement.
ShowQueries represents a SHOW QUERIES statement.
ShowRangeForRow represents a SHOW RANGE FOR ROW statement.
ShowRanges represents a SHOW RANGES statement.
ShowRoleGrants represents a SHOW GRANTS ON ROLE statement.
ShowRoles represents a SHOW ROLES statement.
ShowSavepointStatus represents a SHOW SAVEPOINT STATUS statement.
ShowSchedules represents a SHOW SCHEDULES statement.
ShowSchemas represents a SHOW SCHEMAS statement.
ShowSequences represents a SHOW SEQUENCES statement.
ShowSessions represents a SHOW SESSIONS statement.
ShowSyntax represents a SHOW SYNTAX statement.
ShowTables represents a SHOW TABLES statement.
ShowTableStats represents a SHOW STATISTICS FOR TABLE statement.
ShowTraceForSession represents a SHOW TRACE FOR SESSION statement.
ShowTransactions represents a SHOW TRANSACTIONS statement.
ShowTransactionStatus represents a SHOW TRANSACTION STATUS statement.
ShowTypes represents a SHOW TYPES statement.
ShowUsers represents a SHOW USERS statement.
ShowVar represents a SHOW statement.
ShowZoneConfig represents a SHOW ZONE CONFIGURATION statement.
Split represents an `ALTER TABLE/INDEX .
StatementSource encapsulates one of the other statements as a data source.
StorageParam is a key-value parameter for table storage.
StrVal represents a constant string value.
Subquery represents a subquery.
TableIndexName refers to a table index.
TableName corresponds to the name of a table in a FROM clause, INSERT or UPDATE statement, etc.
TableRef represents a numeric table reference.
TargetList represents a list of targets.
TestingMapTypeResolver is a fake type resolver for testing purposes.
TransactionModes holds the transaction modes for a transaction.
Truncate represents a TRUNCATE statement.
Tuple represents a parenthesized list of expressions.
TupleStar represents (E).* expressions.
TypeCollectorVisitor is an expression visitor that collects all explicit OID type references in an expression.
TypedDummy is a dummy expression that represents a dummy value with a specified type.
TypeName corresponds to the name of a type in a CREATE TYPE statement, in an expression, or column type etc.
UnaryExpr represents a unary value expression.
UnaryOp is a unary operator.
UnionClause represents a UNION statement.
UniqueConstraint represents UNIQUE on a column.
UniqueConstraintTableDef represents a unique constraint within a CREATE TABLE statement.
UnqualifiedStar corresponds to a standalone '*' in a scalar expression.
UnresolvedName corresponds to an unresolved qualified name.
UnresolvedObjectName is an unresolved qualified name for a database object (table, view, etc).
Unsplit represents an `ALTER TABLE/INDEX .
Update represents an UPDATE statement.
UpdateExpr represents an update expression.
UsingJoinCond represents a USING join condition.
ValuesClause represents a VALUES clause.
ValuesClauseWithNames is a VALUES clause that has been annotated with column names.
VariadicType is a TypeList implementation which accepts a fixed number of arguments at the beginning and an arbitrary number of homogenous arguments at the end.
When represents a WHEN sub-expression.
Where represents a WHERE or HAVING clause.
WindowDef represents a single window definition expression.
WindowFrame represents static state of window frame over which calculations are made.
WindowFrameBound specifies the offset and the type of boundary.
WindowFrameBounds specifies boundaries of the window frame.
WindowFrameRangeOps allows for looking up an implementation of binary operators necessary for RANGE mode of framing.
WindowFrameRun contains the runtime state of window frame during calculations.
With represents a WITH statement.
ZoneSpecifier represents a reference to a configurable zone of the keyspace.
# Interfaces
AggregateFunc accumulates the result of a function of a Datum.
AlterIndexCmd represents an index modification operation.
AlterSchemaCmd represents a schema modification operation.
AlterTableCmd represents a table modification operation.
AlterTypeCmd represents a type modification operation.
CCLOnlyStatement is a marker interface for statements that require a CCL binary for successful planning or execution.
ClientNoticeSender is a limited interface to send notices to the client.
ColumnItemResolver is the helper interface to resolve column items.
ColumnMutationCmd is the subset of AlterTableCmds that modify an existing column.
ColumnQualification represents a constraint on a column.
ColumnResolutionResult is an opaque reference returned by ColumnItemResolver.Resolve().
ColumnSourceMeta is an opaque reference passed through column item resolution.
CompositeDatum is a Datum that may require composite encoding in indexes.
Constant is an constant literal expression which may be resolved to more than one type.
ConstraintTableDef represents a constraint definition within a CREATE TABLE statement.
Datum represents a SQL value.
EvalDatabase consists of functions that reference the session database and is to be used from EvalContext.
EvalPlanner is a limited planner that can be used from EvalContext.
EvalSessionAccessor is a limited interface to access session variables.
Expr represents an expression.
FunctionReference is the common interface to UnresolvedName and QualifiedFunctionName.
HiddenFromShowQueries is a pseudo-interface to be implemented by statements that should not show up in SHOW QUERIES (and are hence not cancellable using CANCEL QUERIES either).
IndexedRow is a row with a corresponding index.
IndexedRows are rows with the corresponding indices.
IndexedVarContainer provides the implementation of TypeCheck, Eval, and String for IndexedVars.
InternalExecutor is a subset of sqlutil.InternalExecutor (which, in turn, is implemented by sql.InternalExecutor) used by this sem/tree package which can't even import sqlutil.
JoinCond represents a join condition.
NameResolutionResult is an opaque reference returned by LookupObject().
NodeFormatter is implemented by nodes that can be pretty-printed.
ObjectName is a common interface for qualified object names.
ObjectNameExistingResolver is the helper interface to resolve table names when the object is expected to exist already.
ObjectNameTargetResolver is the helper interface to resolve object names when the object is not expected to exist.
ObserverStatement is a marker interface for statements which are allowed to run regardless of the current transaction state: statements other than rollback are generally rejected if the session is in a failed transaction state, but it's convenient to allow some statements (e.g.
Operator is used to identify Operators; used in sql.y.
ParseTimeContext provides the information necessary for parsing dates, times, and timestamps.
PeerGroupChecker can check if a pair of row indices within a partition are in the same peer group.
PrivilegedAccessor gives access to certain queries that would otherwise require someone with RootUser access to query a given data source.
RegexpCacheKey allows cache keys to take the form of different types, as long as they are comparable and can produce a pattern when needed for regexp compilation.
ResolvableTypeReference represents a type that is possibly unknown until type-checking/type name resolution is performed.
ReturningClause represents the returning clause on a statement.
SchemaMeta is an opaque reference returned by LookupSchema().
ScrubOption represents a scrub option.
SelectStatement represents any SELECT statement.
SequenceOperators is used for various sql related functions that can be used from EvalContext.
Statement represents a statement.
SubqueryExpr is an interface used to identify an expression as a subquery.
TableDef represents a column, index or constraint definition within a CREATE TABLE statement.
TableExpr represents a table expression.
TablePattern is the common interface to UnresolvedName, TableName and AllTablesSelector.
TenantOperator is capable of interacting with tenant state, allowing SQL builtin functions to create and destroy tenants.
TypedExpr represents a well-typed expression.
TypeList is a list of types representing a function parameter list.
TypeReferenceResolver is the interface that will provide the ability to actually look up type metadata and transform references into *types.T's.
ValueGenerator is the interface provided by the value generator functions for SQL SRfs.
VariableExpr is an Expr that may change per row.
VarName occurs inside scalar expressions.
Visitor defines methods that are called for nodes during an expression or statement walk.
WindowFunc performs a computation on each row using data from a provided *WindowFrameRun.
# Type aliases
AggType specifies the type of aggregation.
AlterIndexCmds represents a list of index alterations.
AlterTableCmds represents a list of table alterations.
AnnotationIdx is the 1-based index of an annotation.
Annotations is a container for AST annotations.
ArgTypes is very similar to ArgTypes except it allows keeping a string name for each argument as well and using those when printing the human-readable signature.
ArraySubscripts represents a sequence of one or more array subscripts.
AuditMode represents a table audit mode.
BackupDetails represents the type of details to display for a SHOW BACKUP statement.
BinaryOperator represents a binary operator.
ColumnCollation represents a COLLATE clause for a column.
ColumnID is a custom type for ColumnDescriptor IDs.
ComparisonOperator represents a binary operator.
CompositeKeyMatchMethod is the algorithm use when matching composite keys.
CopyFormat identifies a COPY data format.
CreateTableOnCommitSetting represents the CREATE TABLE ..
CreateTypeVariety represents a particular variety of user defined types.
DatabaseLookupFlags is the flag struct suitable for GetDatabaseDesc().
Datums is a slice of Datum values.
DBool is the boolean Datum.
DBytes is the bytes Datum.
DeferrableMode holds the deferrable mode for a transaction.
DescriptorCoverage specifies whether or not a subset of descriptors were requested or if all the descriptors were requested, so all the descriptors are covered in a given backup.
DesiredObjectKind represents what kind of object is desired in a name resolution attempt.
DFloat is the float Datum.
DInt is the int Datum.
Direction for ordering results.
DiscardMode is an enum of the various discard modes.
DistinctOn represents a DISTINCT ON clause.
DropBehavior represents options for dropping schema elements.
DString is the string Datum.
DTime is the time Datum.
EnumValue represents a single enum value.
EnumValueList represents a list of enum values.
ExplainFlag is a modifier in an EXPLAIN statement (like VERBOSE).
ExplainMode indicates the mode of the explain.
Exprs represents a list of value expressions.
FmtFlags carries options for the pretty-printer.
FunctionClass specifies the class of the builtin function.
GeneratorFactory is the type of constructor functions for ValueGenerator objects.
GroupBy represents a GROUP BY clause.
ID is a custom type for {Database,Table}Descriptor IDs.
IndexElemList is list of IndexElem.
IndexID is a custom type for IndexDescriptor IDs.
IsolationLevel holds the isolation level for a transaction.
JobCommand determines which type of action to effect on the selected job(s).
KVOptions is a list of KVOptions.
LikeTableOpt represents one of the types of things that can be included or excluded in a LIKE table declaration.
LockingClause represents a locking clause, like FOR UPDATE.
LockingStrength represents the possible row-level lock modes for a SELECT statement.
LockingWaitPolicy represents the possible policies for handling conflicting locks held by other active transactions when attempting to lock rows due to FOR UPDATE/SHARE clauses (i.e.
A Name is an SQL identifier.
A NameList is a list of identifiers.
NameParts is the array of strings that composes the path in an UnresolvedName.
Nullability represents either NULL, NOT NULL or an unspecified value (silent NULL).
NullsOrder for specifying ordering of NULLs.
NumResolutionResults represents the number of results in the lookup of data sources matching a given prefix.
OrderBy represents an ORDER BY clause.
OrderType indicates which type of expression is used in ORDER BY.
PartitionByType is an enum of each type of partitioning (LIST/RANGE).
Persistence defines the persistence strategy for a given table.
PlaceholderIdx is the 0-based index of a placeholder.
PlaceholderTypes stores placeholder types (or type hints), one per PlaceholderIdx.
PrettyAlignMode directs which alignment mode to use.
QueryArguments stores query arguments, one per PlaceholderIdx.
ReadWriteMode holds the read write mode for a transaction.
ReferenceAction is the method used to maintain referential integrity through foreign keys.
RefreshDataOption corresponds to arguments for the REFRESH MATERIALIZED VIEW statement.
RequiredTableKind controls what kind of TableDescriptor backed object is requested to be resolved.
ReturningExprs represents RETURNING expressions.
ReturnTyper defines the type-level function in which a builtin function's return type is determined.
ScheduleCommand determines which type of action to effect on the selected job(s).
ScheduledJobExecutorType is a type identifying the names of the supported scheduled job executors.
ScheduleState describes what kind of schedules to display.
SchemaLookupFlags is the flag struct suitable for GetSchema().
ScrubOptions corresponds to a comma-delimited list of scrub options.
ScrubType describes the SCRUB statement operation.
SelectExprs represents SELECT expressions.
SemaRejectFlags contains flags to filter out certain kinds of expressions.
SequenceOptions represents a list of sequence options.
ShowTraceType is an enum of SHOW TRACE variants.
SimpleVisitFn is a function that is run for every node in the VisitPre stage; see SimpleVisit.
SpecializedVectorizedBuiltin is used to map overloads to the vectorized operator that is specific to that implementation of the builtin function.
StatementType is the enumerated type for Statement return styles on the wire.
StorageParams is a list of StorageParams.
StringOrPlaceholderOptList is a list of strings or placeholders.
TableDefs represents a list of table definitions.
TableExprs represents a list of table expressions.
TableIndexNames is a list of indexes.
TableNames represents a comma separated list (see the Format method) of table names.
TablePatterns implement a comma-separated list of table patterns.
TwoArgFn is a function that operates on two Datum arguments.
TypedExprs represents a list of well-typed value expressions.
UnaryOperator represents a unary operator.
UnionType represents one of the three set operations in sql.
An UnrestrictedName is a Name that does not need to be escaped when it matches a reserved keyword.
UpdateExprs represents a list of update expressions.
UserPriority holds the user priority for a transaction.
ValidationBehavior specifies whether or not a constraint is validated.
Volatility indicates whether the result of a function is dependent *only* on the values of its explicit arguments, or can change due to outside factors (such as parameter variables or table contents).
Window represents a WINDOW clause.
WindowFrameBoundType indicates which type of boundary is used.
WindowFrameExclusion indicates which mode of exclusion is used.
WindowFrameMode indicates which mode of framing is used.