package
2.1.0-alpha.20180416+incompatible
Repository: https://github.com/coyle/cockroach.git
Documentation: pkg.go.dev

# Functions

AddWithOverflow returns a+b.
AppendToMaybeNullArray appends an element to an array.
AsDArray attempts to retrieve a *DArray from an Expr, returning a *DArray 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.
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.
AsDString attempts to retrieve a DString from an Expr, returning a DString 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.
AsString pretty prints a node to a string.
AsStringWithFlags pretty prints a node to a string given specific flags.
CanModifySchema returns true if the statement can modify the database schema.
CanWriteData returns true if the statement can modify data.
ConcatArrays concatenates two arrays.
ContainsVars returns true if the expression contains any variables.
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.
ErrNameString 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.
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.
FixedReturnType functions simply return a fixed type, independent of argument types.
FmtExpr returns FmtFlags that indicate how the pretty-printer should format expressions.
FoldConstantLiterals folds all constant literals using exact arithmetic.
GetBool gets DBool or an error (also treats NULL as false, not an error).
GetParamsAndReturnType gets the parameters and return type of an overloadImpl.
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.
ImpureFunctions returns the impure functions in an expression.
IntPow computes the value of x^y.
IsConst returns whether the expression is constant.
LimitDecimalWidth limits d's precision (total number of digits) and scale (number of digits after the decimal point).
MakeColumnItem constructs a column item from an already valid TableName.
MakeDBool converts its argument to a *DBool, returning either DBoolTrue or DBoolFalse.
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.
MakeFmtCtx creates a FmtCtx from an existing buffer and flags.
MakeIndexedVarHelper initializes an IndexedVarHelper structure.
MakeNormalizeVisitor creates a NormalizeVisitor instance.
MakePlaceholderInfo constructs an empty PlaceholderInfo.
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.
MakeTableNameWithSchema creates a new fully qualified table name.
MakeTestingEvalContext returns an EvalContext that includes a MemoryMonitor.
MakeTypesOnlyIndexedVarHelper creates an IndexedVarHelper which provides the given types for indexed vars.
MakeUnqualifiedTableName creates a new base table name.
MockNameTypes populates presetTypesForTesting for a test.
MustBeDArray attempts to retrieve a *DArray from an Expr, panicking if the assertion fails.
MustBeDBool attempts to retrieve a DBool from an Expr, panicking if the assertion fails.
MustBeDInt attempts to retrieve a DInt 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.
MustBeDString attempts to retrieve a DString from an Expr, panicking if the assertion fails.
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.
NewBytesStrVal constructs a StrVal instance suitable as byte array.
NewColumnItem constructs a column item from an already valid TableName.
NewColumnTableDef constructs a column definition for a CreateTable statement.
NewDArray returns a DArray containing elements of the specified type.
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 in the provided time zone.
NewDFloat is a helper routine to create a *DFloat initialized from its argument.
NewDInt is a helper routine to create a *DInt initialized from its argument.
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.
NewDString is a helper routine to create a *DString initialized from its argument.
NewDTuple creates a *DTuple with the provided datums.
NewDTupleWithCap creates a *DTuple with the provided capacity.
NewDTupleWithLen creates a *DTuple with the provided length.
NewDUuid is a helper routine to create a *DUuid initialized from its argument.
NewFmtCtxWithBuf returns a FmtCtxWithBuf ready for use.
NewFunctionDefinition allocates a function definition corresponding to the given built-in definition.
NewIndexedVar is a helper routine to create a standalone Indexedvar with the given index value.
NewOrdinalReference is a helper routine to create a standalone IndexedVar with the given index value.
NewPlaceholder allocates a Placeholder.
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.
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.
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.
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.
NewUnqualifiedTableName creates a new base table name.
NewUnresolvedName constructs an UnresolvedName from some strings.
NewWhere creates a WHERE or HAVING clause out of an Expr.
NormalizeTableName transforms an UnresolvedName into a TableName.
ParseDArrayFromString parses the string-form of constructing arrays, handling cases such as `'{1,2,3}'::INT[]`.
ParseDBool parses and returns the *DBool Datum value represented by the provided string, or an error if parsing is unsuccessful.
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.
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.
ParseDIntervalWithField is like ParseDInterval, but it also takes a DurationField 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.
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 CastTargetType.
PickFromTuple picks the greatest (or least value) from a tuple.
PrependToMaybeNullArray prepends an element in the front of an arrray.
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 FmtParsable; it is appropriate when we store expressions into strings that are later parsed back into expressions.
SimilarEscape converts a SQL:2008 regexp pattern to POSIX style, so it can be used by our regexp engine.
SimpleVisit is a convenience wrapper for visitors that only have VisitPre code and don't return any results except an error.
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.
StringToColType returns a column type given a string representation of the type.
StripMemoizedFuncs strips memoized function references from expression trees.
StripParens strips any parentheses surrounding an expression and returns the inner expression.
TimestampDifference computes the interval difference between two TimestampTZ datums.
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.
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.
ValidateRestartCheckpoint checks that a checkpoint name is our magic restart value.
WalkExpr traverses the nodes in an expression.
WalkExprConst is a variant of WalkExpr for visitors that do not modify the expression.
WalkStmt walks the entire parsed stmt calling WalkExpr on each expression, and replacing each expression with the one returned by WalkExpr.
WrapFunction creates a new ResolvableFunctionReference holding a pre-resolved function.

# Constants

Ack indicates that the statement does not have a meaningful return.
AggregateClass is a builtin aggregate function.
ComparisonExpr.Operator.
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.
Where.Type.
JoinTableExpr.Join.
JoinTableExpr.Join.
JoinTableExpr.Join.
JoinTableExpr.Join.
Where.Type.
AuditModeDisable is the default mode - no audit.
AuditModeReadWrite enables audit on read or write statements.
BinaryExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
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).
BinaryExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
CopyIn indicates a COPY FROM statement.
These constants designate the various time parts of an interval.
DDL indicates that the statement mutates the database schema.
Direction values.
Direction values.
DiscardModeAll represents a DISCARD ALL statement.
FuncExpr.Type.
BinaryExpr.Operator.
DropBehavior values.
DropBehavior values.
DropBehavior values.
ComparisonExpr.Operator.
ExactlyOne indicates just one source matching the requested name.
Union.Type.
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.
FmtArrays instructs the pretty-printer to print strings without wrapping quotes, if the string contains no special characters.
FmtBareIdentifiers instructs the pretty-printer to print identifiers without wrapping quotes in any case.
FmtBareStrings instructs the pretty-printer to print strings without wrapping quotes, if the string contains no special characters.
FmtCheckEquivalence instructs the pretty-printer to produce a representation that can be used to check equivalence of expressions.
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 (useful for serialization of expressions).
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).
ComparisonExpr.Operator.
GeneratorClass is a builtin generator function.
ComparisonExpr.Operator.
UserPriority values.
These constants designate the various time parts of an interval.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
Union.Type.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
BinaryExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
UserPriority values.
BinaryExpr.Operator.
ComparisonExpr.Operator.
BinaryExpr.Operator.
These constants designate the various time parts of an interval.
BinaryExpr.Operator.
These constants designate the various time parts of an interval.
MoreThanOne signals an ambiguous match.
BinaryExpr.Operator.
ComparisonExpr.Operator.
The values for ReferenceAction.
NoResults for when there is no result.
UserPriority values.
NormalClass is a standard builtin function.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
The values for NullType.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
The values for NullType.
BinaryExpr.Operator.
ComparisonExpr.Operator.
UnaryExpr.Operator.
OrderByColumn is the regular "by expression/column" ORDER BY specification.
OrderByIndex enables the user to specify a given index' columns implicitly.
PartitionByList indicates a PARTITION BY LIST clause.
PartitionByRange indicates a PARTITION BY LIST clause.
BinaryExpr.Operator.
BinaryExpr.Operator.
PublicSchema is the name of the physical schema in every database/catalog.
PublicSchemaName is the same, typed as Name.
ReadWriteMode values.
ReadWriteMode values.
ComparisonExpr.Operator.
ComparisonExpr.Operator.
RestartSavepointName is the only savepoint name that we accept, modulo capitalization.
The values for ReferenceAction.
Rows indicates that the statement returns the affected rows after the statement was applied.
RowsAffected indicates that the statement returns the count of affected rows.
BinaryExpr.Operator.
ScrubDatabase describes the SCRUB operation SCRUB DATABASE.
ScrubTable describes the SCRUB operation SCRUB TABLE.
These constants designate the various time parts of an interval.
SecondsInDay is the number of seconds in a Day.
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.
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.
IsolationLevel values.
ComparisonExpr.Operator.
TimestampOutputFormat is used to output all timestamps.
UnaryExpr.Operator.
UnaryExpr.Operator.
UnaryExpr.Operator.
Union.Type.
Unknown indicates that the statement does not have a known return style at the time of parsing.
IsolationLevel values.
ReadWriteMode values.
UserPriority values.
ValidationDefault is the default validation behavior (immediate).
ValidationSkip skips validation of any existing data.
WindowClass is a builtin window function.
These constants designate the various time parts of an interval.

# 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.
DNull is the NULL Datum.
DZero is the zero-valued integer Datum.
ErrDivByZero is reported on a division by zero.
ErrZeroModulus is reported when computing the rest of a division by zero.
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.
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.
StrValAvailBytesString is the set of types convertible to either byte array or string.
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.
AlterIndex represents an ALTER INDEX statement.
AlterIndexPartitionBy represents an ALTER INDEX PARTITION BY 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.
AlterTableDropColumn represents a DROP COLUMN command.
AlterTableDropConstraint represents a DROP CONSTRAINT command.
AlterTableDropNotNull represents an ALTER COLUMN DROP NOT NULL command.
AlterTableInjectStats represents an ALTER TABLE INJECT STATISTICS statement.
AlterTablePartitionBy represents an ALTER TABLE PARTITION BY command.
AlterTableSetAudit represents an ALTER TABLE AUDIT SET statement.
AlterTableSetDefault represents an ALTER COLUMN SET DEFAULT or DROP DEFAULT command.
AlterTableValidateConstraint represents a VALIDATE CONSTRAINT command.
AlterUserSetPassword represents an ALTER USER ..
AndExpr represents an AND expression.
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>[ ..
AsOfClause represents an as of time.
Backup represents a BACKUP statement.
BeginTransaction represents a BEGIN statement.
BinaryExpr represents a binary value expression.
BinOp is a binary operator.
Builtin is a built-in function.
CancelJob represents a CANCEL JOB statement.
CancelQuery represents a CANCEL QUERY statement.
CancelSession represents a CANCEL SESSION statement.
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.
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.
CommitTransaction represents a COMMIT statement.
ComparisonExpr represents a two-value comparison expression.
CopyFrom represents a COPY FROM statement.
CreateChangefeed represents a CREATE CHANGEFEED statement.
CreateDatabase represents a CREATE DATABASE statement.
CreateIndex represents a CREATE INDEX statement.
CreateRole represents a CREATE ROLE statement.
CreateSequence represents a CREATE SEQUENCE statement.
CreateStats represents a CREATE STATISTICS statement.
CreateTable represents a CREATE TABLE statement.
CreateUser represents a CREATE USER statement.
CreateView represents a CREATE VIEW statement.
CTE represents a common table expression inside of a WITH clause.
DArray is the array Datum.
DCollatedString is the Datum for strings with a locale.
DDecimal is the decimal Datum.
Deallocate represents a DEALLOCATE statement.
DefaultVal represents the DEFAULT expression.
Delete represents a DELETE statement.
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 (see tOidWrapper).
DropDatabase represents a DROP DATABASE statement.
DropIndex represents a DROP INDEX statement.
DropRole represents a DROP ROLE statement.
DropSequence represents a DROP SEQUENCE statement.
DropTable represents a DROP TABLE statement.
DropUser represents a DROP USER statement.
DropView represents a DROP VIEW statement.
DTable is the table Datum.
DTimestamp is the timestamp Datum.
DTimestampTZ is the timestamp Datum that is rendered with session offset.
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.
FamilyTableDef represents a family definition within a CREATE TABLE statement.
FmtCtx is suitable for passing to Format() methods.
FmtCtxWithBuf is a combination of FmtCtx and bytes.Buffer, meant for use in the following pattern: f := NewFmtCtxWithBuf(flags) f.FormatNode(...) f.WriteString(...) ..
ForeignKeyConstraintTableDef represents a FOREIGN KEY constraint in the AST.
From represents a FROM clause.
FuncExpr represents a function call.
FunctionDefinition implements a reference to the (possibly several) overloads for a built-in function.
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.
IfExpr represents an IF expression.
Import represents a IMPORT statement.
IndexedRow is a row with a corresponding index.
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.
IndexHints represents "@<index_name>" or "@{param[,param]}" where param is one of: - FORCE_INDEX=<index_name> - NO_INDEX_JOIN 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.
IsOfTypeExpr represents an IS {,NOT} OF (type_list) expression.
JoinTableExpr represents a TableExpr that's a JOIN operation.
KVOption is a key-value option.
Limit represents a LIMIT clause.
ListPartition represents a PARTITION definition within a PARTITION BY LIST.
MaxVal represents the MAXVALUE expression.
MinVal represents the MINVALUE expression.
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.
NormalizableTableName implements an editable table name.
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.
OnConflict represents an `ON CONFLICT (columns) DO UPDATE SET exprs WHERE where` clause.
OnJoinCond represents an ON join condition.
Order represents an ordering expression.
OrExpr represents an OR expression.
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.
PauseJob represents a PAUSE JOB statement.
Placeholder represents a named placeholder.
PlaceholderInfo defines the interface to SQL placeholders.
Prepare represents a PREPARE statement.
PrimaryKeyConstraint represents NULL 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.
A RegexpCache is a cache used to store compiled regular expressions.
ReleaseSavepoint represents a RELEASE SAVEPOINT <name> statement.
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 statement.
ResolvableFunctionReference implements the editable reference cell of a FuncExpr.
Restore represents a RESTORE statement.
ResumeJob represents a RESUME JOB statement.
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.
Savepoint represents a SAVEPOINT <name> statement.
Scatter represents an `ALTER TABLE/INDEX .
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.
SequenceOption represents an option on a CREATE SEQUENCE statement.
SetClusterSetting represents a SET CLUSTER SETTING statement.
SetSessionCharacteristics represents a SET SESSION CHARACTERISTICS AS TRANSACTION statement.
SetTransaction represents a SET TRANSACTION statement.
SetVar represents a SET or RESET statement.
SetZoneConfig represents an ALTER DATABASE/TABLE..
ShowBackup represents a SHOW BACKUP statement.
ShowClusterSetting represents a SHOW CLUSTER SETTING statement.
ShowColumns represents a SHOW COLUMNS statement.
ShowConstraints represents a SHOW CONSTRAINTS statement.
ShowCreateSequence represents a SHOW CREATE SEQUENCE statement.
ShowCreateTable represents a SHOW CREATE TABLE statement.
ShowCreateView represents a SHOW CREATE VIEW statement.
ShowDatabases represents a SHOW DATABASES statement.
ShowFingerprints represents a SHOW EXPERIMENTAL_FINGERPRINTS statement.
ShowGrants represents a SHOW GRANTS statement.
ShowHistogram represents a SHOW HISTOGRAM statement.
ShowIndex represents a SHOW INDEX statement.
ShowJobs represents a SHOW JOBS statement.
ShowQueries represents a SHOW QUERIES statement.
ShowRanges represents a SHOW TESTING_RANGES statement.
ShowRoleGrants represents a SHOW GRANTS ON ROLE statement.
ShowRoles represents a SHOW ROLES statement.
ShowSchemas represents a SHOW SCHEMAS 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.
ShowTrace represents a SHOW TRACE FOR <stmt>/SESSION statement.
ShowTransactionStatus represents a SHOW TRANSACTION STATUS statement.
ShowUsers represents a SHOW USERS statement.
ShowVar represents a SHOW statement.
ShowZoneConfig represents an EXPERIMENTAL SHOW ZONE CONFIGURATION..
Split represents an `ALTER TABLE/INDEX .
StatementSource encapsulates one of the other statements as a data source.
StrVal represents a constant string value.
Subquery represents a subquery.
TableName corresponds to the name of a table in a FROM clause, INSERT or UPDATE statement, etc.
TableNamePrefix corresponds to the path prefix of a table name.
TableNameWithIndex represents a "table@index", used in statements that specifically refer to an index.
TableRef represents a numeric table reference.
TargetList represents a list of targets.
TestingRelocate represents an `ALTER TABLE/INDEX .
TransactionModes holds the transaction modes for a transaction.
Truncate represents a TRUNCATE statement.
Tuple represents a parenthesized list of expressions.
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.
Update represents an UPDATE statement.
UpdateExpr represents an update expression.
UsingJoinCond represents a USING join condition.
ValuesClause represents a VALUES clause.
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 is a view into a subset of data over which calculations are made.
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.
AlterTableCmd represents a table modification operation.
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.
CtxProvider is anything that can return a Context.
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.
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 QUERY either).
HiddenFromStats is a pseudo-interface to be implemented by statements that should not show up in per-app statistics.
IndependentFromParallelizedPriors is a pseudo-interface to be implemented by statements which do not force parallel statement execution synchronization when they run.
IndexedVarContainer provides the implementation of TypeCheck, Eval, and String for IndexedVars.
JoinCond represents a join condition.
NameResolutionResult is an opaque reference returned by LookupObject().
NodeFormatter is implemented by nodes that can be pretty-printed.
ObserverStatement is a marker interface to be implemented by statements which are always valid and do not modify neither the session state, the txn state or the database.
Operator is used to identify Operators; used in sql.y.
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.
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.
TableDef represents a column, index or constraint definition within a CREATE TABLE statement.
TableExpr represents a table expression.
TableNameExistingResolver is the helper interface to resolve table names when the object is expected to exist already.
TableNameReference implements the editable cell of a TableExpr that refers to a single table.
TableNameTargetResolver is the helper interface to resolve table names when the object is not expected to exist.
TablePattern is the common interface to UnresolvedName, TableName and AllTablesSelector.
TypedExpr represents a well-typed expression.
TypeList is a list of types representing a function parameter list.
ValueGenerator is the interface provided by the object held by a DTable; objects that implement this interface are able to produce rows of values in a streaming fashion (like Go iterators or generators in Python).
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.
WalkableStmt is implemented by statements that can appear inside an expression (selects) or we want to start a walk from (using WalkStmt).
WindowFunc performs a computation on each row using data from a provided WindowFrame.

# Type aliases

AlterIndexCmds represents a list of index alterations.
AlterTableCmds represents a list of table alterations.
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.
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.
Datums is a slice of Datum values.
DBool is the boolean Datum.
DBytes is the bytes Datum.
DDate is the date Datum represented as the number of days after the Unix epoch.
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.
DurationField is the type of a postgres duration field.
Exprs represents a list of value expressions.
FmtFlags carries options for the pretty-printer.
FunctionClass specifies the class of the builtin function.
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.
KVOptions is a list of KVOptions.
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.
NormalizableTableNames corresponds to a comma-delimited list of normalizable table names.
Nullability represents either NULL, NOT NULL or an unspecified value (silent NULL).
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).
PlaceholderTypes relates placeholder names to their resolved type.
QueryArguments relates placeholder names to their provided query argument.
ReadWriteMode holds the read write mode for a transaction.
ReferenceAction is the method used to maintain referential integrity through foreign keys.
ReturningExprs represents RETURNING expressions.
ReturnTyper defines the type-level function in which a builtin function's return type is determined.
ScrubOptions corresponds to a comma-delimited list of scrub options.
ScrubType describes the SCRUB statement operation.
SelectExprs represents SELECT 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.
StatementList is a list of statements.
StatementType is the enumerated type for Statement return styles on the wire.
TableDefs represents a list of table definitions.
TableExprs represents a list of table expressions.
TableNames represents a comma separated list (see the Format method) of table names.
TableNameWithIndexList is a list of indexes.
TablePatterns implement a comma-separated list of table patterns.
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.
Window represents a WINDOW clause.