expressions

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	IntoOutfile  = "OUTFILE"
	IntoDumpfile = "DUMPFILE"
)

Into file-write kinds (Into.kind) — MySQL server-side SELECT ... INTO writes.

View Source
const (
	ShowWarnings       = "WARNINGS"
	ShowErrors         = "ERRORS"
	ShowGrants         = "GRANTS"
	ShowCreateUser     = "CREATE USER"
	ShowProcesslist    = "PROCESSLIST"
	ShowEngine         = "ENGINE"
	ShowBinlogEvents   = "BINLOG EVENTS"
	ShowRelaylogEvents = "RELAYLOG EVENTS"
	ShowMasterStatus   = "MASTER STATUS"
	ShowBinaryLogs     = "BINARY LOGS"
	ShowReplicaStatus  = "REPLICA STATUS"
	ShowReplicas       = "REPLICAS"
)

SHOW targets (Show.this) — the MySQL SHOW forms distinguished from generic schema-metadata SHOWs. Each is the canonical label the parser folds every spelling to. See the Show.this boundary in the package doc above: Postgres SHOW carries a verbatim config-parameter name instead, not one of these.

View Source
const SetItemTransaction = "TRANSACTION"

SetItemTransaction is the SetItem.kind for `SET TRANSACTION`. Every SetItem.kind is canonical-uppercase; only the form a consumer keys on directly is named here.

Variables

View Source
var ArrayTypes = map[DType]bool{
	DTypeArray: true,
	DTypeList:  true,
}

BinaryTypes ports DataType.BINARY_TYPES (expressions/datatypes.py:230-237).

View Source
var FloatTypes = map[DType]bool{
	DTypeDouble: true,
	DTypeFloat:  true,
}
View Source
var FunctionByName = map[string]func([]Expression) Expression{}/* 284 elements not displayed */
View Source
var GenerateFunc func(Expression, GenerateOptions) (string, error)
View Source
var MaybeParseFunc func(sql string, dialect DialectType) (Expression, error)

MaybeParseFunc and ParseIntoFunc are the parser hooks the root sqlglot package installs at init, breaking the expressions -> parser import cycle. They are written once during package initialization and only read afterwards, so concurrent parsing is safe; do not reassign them at runtime.

View Source
var ParseIntoFunc func(sql string, dialect DialectType, into Kind, ignoreErrors bool) (Expression, error)
View Source
var TablePartKeys = []string{"this", "schema", "catalog"}
View Source
var UnabbreviatedUnitName = map[string]string{
	"D": "DAY", "H": "HOUR", "M": "MINUTE", "MS": "MILLISECOND", "NS": "NANOSECOND",
	"Q": "QUARTER", "S": "SECOND", "US": "MICROSECOND", "W": "WEEK", "Y": "YEAR",
}

UnabbreviatedUnitName mirrors TimeUnit.UNABBREVIATED_UNIT_NAME (expressions/core.py:2040-2051).

Functions

func ArgKeys

func ArgKeys(k Kind) []string

ArgKeys returns the arg keys of a Kind in class-declaration order (mirrors Python's iteration over Expr.arg_types). Used by the generator's function fallback.

func ArgsOf

func ArgsOf(e Expression) map[string]any

ArgsOf returns a shallow copy of e's live args map (keys -> node|[]node|scalar), mirroring Python's Expression.args for callers that must iterate all set args.

func ClassName

func ClassName(k Kind) string

ClassName returns the PascalCase class name for a Kind (e.g. "StddevPop").

func DataTypeIsType

func DataTypeIsType(e Expression, checkNullable bool, dtypes ...any) bool

func FromArgListFunc

func FromArgListFunc(kind Kind) func([]Expression) Expression

FromArgListFunc is the exported form of genericFunction, for building dialects.Dialect.Functions overlay entries (per-dialect FUNCTIONS overrides, e.g. mysql's CURDATE/DAY_OF_MONTH/LCASE/... cluster in dialects/mysql.go) from outside this package: a plain positional this/expression/... mapping via FromArgList, same as every exp.FunctionByName entry that has no custom builder.

func IsSafeIdentifier

func IsSafeIdentifier(name string) bool

func IsType

func IsType(e Expression, t DType) bool

func IsWrapper

func IsWrapper(e Expression) bool

func SupportsArg

func SupportsArg(kind Kind, key string) bool

Types

type ArgError

type ArgError struct{ Msg string }

func (*ArgError) Error

func (e *ArgError) Error() string

type Args

type Args = map[string]any

type DType

type DType string
const (
	DTypeArray                   DType = "ARRAY"
	DTypeAggregateFunction       DType = "AGGREGATEFUNCTION"
	DTypeSimpleAggregateFunction DType = "SIMPLEAGGREGATEFUNCTION"
	DTypeBigDecimal              DType = "BIGDECIMAL"
	DTypeBigInt                  DType = "BIGINT"
	DTypeBigNum                  DType = "BIGNUM"
	DTypeBigSerial               DType = "BIGSERIAL"
	DTypeBinary                  DType = "BINARY"
	DTypeBit                     DType = "BIT"
	DTypeBlob                    DType = "BLOB"
	DTypeBoolean                 DType = "BOOLEAN"
	DTypeBpchar                  DType = "BPCHAR"
	DTypeChar                    DType = "CHAR"
	DTypeCharacterSet            DType = "CHARACTER_SET"
	DTypeDate                    DType = "DATE"
	DTypeDate32                  DType = "DATE32"
	DTypeDateMultiRange          DType = "DATEMULTIRANGE"
	DTypeDateRange               DType = "DATERANGE"
	DTypeDatetime                DType = "DATETIME"
	DTypeDatetime2               DType = "DATETIME2"
	DTypeDatetime64              DType = "DATETIME64"
	DTypeDecimal                 DType = "DECIMAL"
	DTypeDecimal32               DType = "DECIMAL32"
	DTypeDecimal64               DType = "DECIMAL64"
	DTypeDecimal128              DType = "DECIMAL128"
	DTypeDecimal256              DType = "DECIMAL256"
	DTypeDecFloat                DType = "DECFLOAT"
	DTypeDouble                  DType = "DOUBLE"
	DTypeDynamic                 DType = "DYNAMIC"
	DTypeEnum                    DType = "ENUM"
	DTypeEnum8                   DType = "ENUM8"
	DTypeEnum16                  DType = "ENUM16"
	DTypeFile                    DType = "FILE"
	DTypeFixedString             DType = "FIXEDSTRING"
	DTypeFloat                   DType = "FLOAT"
	DTypeGeography               DType = "GEOGRAPHY"
	DTypeGeographyPoint          DType = "GEOGRAPHYPOINT"
	DTypeGeometry                DType = "GEOMETRY"
	DTypePoint                   DType = "POINT"
	DTypeRing                    DType = "RING"
	DTypeLineString              DType = "LINESTRING"
	DTypeMultiLineString         DType = "MULTILINESTRING"
	DTypePolygon                 DType = "POLYGON"
	DTypeMultiPolygon            DType = "MULTIPOLYGON"
	DTypeHllSketch               DType = "HLLSKETCH"
	DTypeHstore                  DType = "HSTORE"
	DTypeImage                   DType = "IMAGE"
	DTypeInet                    DType = "INET"
	DTypeInt                     DType = "INT"
	DTypeInt128                  DType = "INT128"
	DTypeInt256                  DType = "INT256"
	DTypeInt4MultiRange          DType = "INT4MULTIRANGE"
	DTypeInt4Range               DType = "INT4RANGE"
	DTypeInt8MultiRange          DType = "INT8MULTIRANGE"
	DTypeInt8Range               DType = "INT8RANGE"
	DTypeInterval                DType = "INTERVAL"
	DTypeIpAddress               DType = "IPADDRESS"
	DTypeIpPrefix                DType = "IPPREFIX"
	DTypeIpv4                    DType = "IPV4"
	DTypeIpv6                    DType = "IPV6"
	DTypeJSON                    DType = "JSON"
	DTypeJSONB                   DType = "JSONB"
	DTypeList                    DType = "LIST"
	DTypeLongBlob                DType = "LONGBLOB"
	DTypeLongText                DType = "LONGTEXT"
	DTypeLowCardinality          DType = "LOWCARDINALITY"
	DTypeMap                     DType = "MAP"
	DTypeMediumBlob              DType = "MEDIUMBLOB"
	DTypeMediumInt               DType = "MEDIUMINT"
	DTypeMediumText              DType = "MEDIUMTEXT"
	DTypeMoney                   DType = "MONEY"
	DTypeName                    DType = "NAME"
	DTypeNChar                   DType = "NCHAR"
	DTypeNested                  DType = "NESTED"
	DTypeNothing                 DType = "NOTHING"
	DTypeNull                    DType = "NULL"
	DTypeNumMultiRange           DType = "NUMMULTIRANGE"
	DTypeNumRange                DType = "NUMRANGE"
	DTypeNVarchar                DType = "NVARCHAR"
	DTypeObject                  DType = "OBJECT"
	DTypeRange                   DType = "RANGE"
	DTypeRowVersion              DType = "ROWVERSION"
	DTypeSerial                  DType = "SERIAL"
	DTypeSet                     DType = "SET"
	DTypeSmallDatetime           DType = "SMALLDATETIME"
	DTypeSmallInt                DType = "SMALLINT"
	DTypeSmallMoney              DType = "SMALLMONEY"
	DTypeSmallSerial             DType = "SMALLSERIAL"
	DTypeStruct                  DType = "STRUCT"
	DTypeSuper                   DType = "SUPER"
	DTypeText                    DType = "TEXT"
	DTypeTinyBlob                DType = "TINYBLOB"
	DTypeTinyText                DType = "TINYTEXT"
	DTypeTime                    DType = "TIME"
	DTypeTimeTz                  DType = "TIMETZ"
	DTypeTimeNs                  DType = "TIME_NS"
	DTypeTimestamp               DType = "TIMESTAMP"
	DTypeTimestampNtz            DType = "TIMESTAMPNTZ"
	DTypeTimestampLtz            DType = "TIMESTAMPLTZ"
	DTypeTimestampTz             DType = "TIMESTAMPTZ"
	DTypeTimestampS              DType = "TIMESTAMP_S"
	DTypeTimestampMs             DType = "TIMESTAMP_MS"
	DTypeTimestampNs             DType = "TIMESTAMP_NS"
	DTypeTinyInt                 DType = "TINYINT"
	DTypeTsMultiRange            DType = "TSMULTIRANGE"
	DTypeTsRange                 DType = "TSRANGE"
	DTypeTstzMultiRange          DType = "TSTZMULTIRANGE"
	DTypeTstzRange               DType = "TSTZRANGE"
	DTypeUBigInt                 DType = "UBIGINT"
	DTypeUInt                    DType = "UINT"
	DTypeUInt128                 DType = "UINT128"
	DTypeUInt256                 DType = "UINT256"
	DTypeUMediumInt              DType = "UMEDIUMINT"
	DTypeUDecimal                DType = "UDECIMAL"
	DTypeUDouble                 DType = "UDOUBLE"
	DTypeUnion                   DType = "UNION"
	DTypeUnknown                 DType = "UNKNOWN"
	DTypeUserDefined             DType = "USER-DEFINED"
	DTypeUSmallInt               DType = "USMALLINT"
	DTypeUTinyInt                DType = "UTINYINT"
	DTypeUUID                    DType = "UUID"
	DTypeVarBinary               DType = "VARBINARY"
	DTypeVarchar                 DType = "VARCHAR"
	DTypeVariant                 DType = "VARIANT"
	DTypeVector                  DType = "VECTOR"
	DTypeXML                     DType = "XML"
	DTypeYear                    DType = "YEAR"
	DTypeTDigest                 DType = "TDIGEST"
)

func DTypeFromName

func DTypeFromName(name string) (DType, bool)

func (DType) IntoExpr

func (d DType) IntoExpr(kwargs Args) Expression

type DialectType

type DialectType = any

DialectType is an alias for any naming the polymorphic dialect argument accepted throughout the public API — nil (base) | string (a name, optionally with settings) | *dialects.Dialect. It is defined in this root package (which imports no other internal package) so every package, including this one's builders and hooks below, can name it without importing dialects and creating an import cycle. dialects.DialectType re-exports this type and carries the full documentation; the two are the same type and fully interchangeable.

type Expression

type Expression interface {
	Kind() Kind
	Arg(key string) any
	Set(key string, val any)
	SetAt(key string, val any, index int, overwrite bool)
	Append(key string, val Expression)
	This() Expression
	Expr() Expression
	Expressions() []Expression
	Text(key string) string
	Name() string
	Alias() string
	AliasOrName() string
	OutputName() string
	Parent() Expression
	ArgKey() string
	Index() int
	SetParent(p Expression, key string, idx int)
	Comments() []string
	AddComments(cs []string, prepend bool)
	PopComments() []string
	Meta() map[string]any
	MetaGet(key string) any
	SetSpan(start, end int)
	Span() (start, end int, ok bool)
	SetSpanText(text string)
	SpanText() (text string, ok bool)
	Is(Trait) bool
	IsPrimitive() bool
	IsLeaf() bool
	Find(t Target) Expression
	FindAll(t Target, bfs ...bool) []Expression
	FindAncestor(kinds ...Kind) Expression
	ParentSelect() Expression
	Root() Expression
	Walk(bfs ...bool) []Expression
	WalkWithPrune(bfs bool, prune func(Expression) bool) []Expression
	Copy() Expression
	Replace(Expression) Expression
	Pop() Expression
	HashKey() uint64
	Equal(Expression) bool
	SQL(opts GenerateOptions) (string, error)
	ToS() string
	ErrorMessages(args []any) []string
	IsString() bool
	IsNumber() bool
	IsInt() bool
	IsStar() bool
	Unnest() Expression
	Unwrap() Expression
	SameParent() bool
	AliasColumnNames() []string
	Selects() []Expression
	NamedSelects() []string
	ToPy() any
	Parts() []Expression
	ToColumn() Expression
	TableName() string
	SchemaName() string
	CatalogName() string
	Left() Expression
	Right() Expression
	Into() Expression
	Keyword() string

	// Query builders (query_builders.go).
	Subquery(alias string, copyValue bool) Expression
	Where(appendValue, copyValue bool, expressions ...Expression) Expression
	Having(appendValue, copyValue bool, expressions ...Expression) Expression
	From_(expression Expression, copyValue bool) Expression
	GroupBy(appendValue, copyValue bool, expressions ...Expression) Expression
	SelectExprs(appendValue, copyValue bool, expressions ...Expression) Expression
	Join(expression Expression, opts JoinOptions) Expression
	Unalias() Expression
	Transform(fun func(Expression) Expression, copyValue bool) Expression
	Is_(other any) Expression
	Eq(other any) Expression
	Not_(copyValue bool) Expression

	IterExpressions(reverse bool) []Expression

	// Annotated types (annotated_type.go).
	Type() Expression
	SetType(dtype any)
	IsType(dtypes ...any) bool
}

func AIEmbed

func AIEmbed(args Args) Expression

func AIForecast

func AIForecast(args Args) Expression

func AIGenerate

func AIGenerate(args Args) Expression

func AISimilarity

func AISimilarity(args Args) Expression

func Abs

func Abs(args Args) Expression

func Acos

func Acos(args Args) Expression

func Acosh

func Acosh(args Args) Expression

func Add

func Add(args Args) Expression

func AddConstraint

func AddConstraint(args Args) Expression

func AddMonths

func AddMonths(args Args) Expression

func AddPartition

func AddPartition(args Args) Expression

func Adjacent

func Adjacent(args Args) Expression

func AlgorithmProperty

func AlgorithmProperty(args Args) Expression

func AliasExpr

func AliasExpr(expression any, alias any, table bool, quoted ...bool) Expression

func AliasNode

func AliasNode(args Args) Expression

func Aliases

func Aliases(args Args) Expression

func All

func All(args Args) Expression

func Alter

func Alter(args Args) Expression

func AlterColumn

func AlterColumn(args Args) Expression

func AlterIndex

func AlterIndex(args Args) Expression

func AlterModifySqlSecurity

func AlterModifySqlSecurity(args Args) Expression

func AlterRename

func AlterRename(args Args) Expression

func AlterSet

func AlterSet(args Args) Expression

func Analyze

func Analyze(args Args) Expression

func AnalyzeHistogram

func AnalyzeHistogram(args Args) Expression

func AnalyzeWith

func AnalyzeWith(args Args) Expression

func And

func And(args Args) Expression

func And_

func And_(expressions ...Expression) Expression

func Anonymous

func Anonymous(args Args) Expression

func AnonymousAggFunc

func AnonymousAggFunc(args Args) Expression

func Any

func Any(args Args) Expression

func AnyValue

func AnyValue(args Args) Expression

AnyValue ports exp.AnyValue (expressions/aggregate.py:17): ANY_VALUE(x) - returns an arbitrary value from the group.

func Apply

func Apply(args Args) Expression

func ApproxDistinct

func ApproxDistinct(args Args) Expression

func ApproxQuantile

func ApproxQuantile(args Args) Expression

ApproxQuantile ports exp.ApproxQuantile (expressions/aggregate.py:234): Presto's APPROX_PERCENTILE(x, [w,] q, [accuracy]).

func ApproxTopK

func ApproxTopK(args Args) Expression

func ArgMax

func ArgMax(args Args) Expression

func ArgMin

func ArgMin(args Args) Expression

func Array

func Array(args Args) Expression

func ArrayAgg

func ArrayAgg(args Args) Expression

func ArrayAll

func ArrayAll(args Args) Expression

func ArrayAny

func ArrayAny(args Args) Expression

func ArrayAppend

func ArrayAppend(args Args) Expression

func ArrayCompact

func ArrayCompact(args Args) Expression

func ArrayConcat

func ArrayConcat(args Args) Expression

func ArrayConcatAgg

func ArrayConcatAgg(args Args) Expression

func ArrayConstructCompact

func ArrayConstructCompact(args Args) Expression

func ArrayContainedBy

func ArrayContainedBy(args Args) Expression

func ArrayContains

func ArrayContains(args Args) Expression

func ArrayContainsAll

func ArrayContainsAll(args Args) Expression

func ArrayDistinct

func ArrayDistinct(args Args) Expression

func ArrayExcept

func ArrayExcept(args Args) Expression

func ArrayFilter

func ArrayFilter(args Args) Expression

func ArrayFirst

func ArrayFirst(args Args) Expression

ArrayFirst ports expressions/array.py:146-147.

func ArrayInsert

func ArrayInsert(args Args) Expression

func ArrayIntersect

func ArrayIntersect(args Args) Expression

func ArrayLast

func ArrayLast(args Args) Expression

func ArrayMax

func ArrayMax(args Args) Expression

func ArrayMin

func ArrayMin(args Args) Expression

func ArrayOverlaps

func ArrayOverlaps(args Args) Expression

func ArrayPosition

func ArrayPosition(args Args) Expression

func ArrayPrepend

func ArrayPrepend(args Args) Expression

func ArrayRemove

func ArrayRemove(args Args) Expression

func ArrayReverse

func ArrayReverse(args Args) Expression

func ArraySize

func ArraySize(args Args) Expression

func ArraySlice

func ArraySlice(args Args) Expression

ArraySlice ports exp.ArraySlice (expressions/array.py:85): SLICE(x, start[, end]).

func ArraySum

func ArraySum(args Args) Expression

func ArrayToString

func ArrayToString(args Args) Expression

func ArrayUniqueAgg

func ArrayUniqueAgg(args Args) Expression

ArrayUniqueAgg ports exp.ArrayUniqueAgg (expressions/aggregate.py:83): Presto's SET_AGG(x) - array of distinct aggregated values.

func Ascii

func Ascii(args Args) Expression

func Asin

func Asin(args Args) Expression

func Asinh

func Asinh(args Args) Expression

func AssumeColumnConstraint

func AssumeColumnConstraint(args Args) Expression

func AtIndex

func AtIndex(args Args) Expression

func AtTimeZone

func AtTimeZone(args Args) Expression

func Atan

func Atan(args Args) Expression

func Atan2

func Atan2(args Args) Expression

Atan2 ports exp.Atan2 (expressions/math.py:35).

func Atanh

func Atanh(args Args) Expression

func Attach

func Attach(args Args) Expression

func AttachOption

func AttachOption(args Args) Expression

func AutoIncrementColumnConstraint

func AutoIncrementColumnConstraint(args Args) Expression

func AutoIncrementProperty

func AutoIncrementProperty(args Args) Expression

func AutoRefreshProperty

func AutoRefreshProperty(args Args) Expression

func Avg

func Avg(args Args) Expression

func Between

func Between(args Args) Expression

func BitLength

func BitLength(args Args) Expression

func BitString

func BitString(args Args) Expression

BitString ports exp.BitString (expressions/query.py:471-472, is_primitive=True): a bit-string literal, e.g. `b'101'` (mysql/postgres) or mysql's bare `0b101`.

func BitmapConstructAgg

func BitmapConstructAgg(args Args) Expression

func BitmapCount

func BitmapCount(args Args) Expression

func BitwiseAnd

func BitwiseAnd(args Args) Expression

func BitwiseAndAgg

func BitwiseAndAgg(args Args) Expression

func BitwiseCount

func BitwiseCount(args Args) Expression

func BitwiseLeftShift

func BitwiseLeftShift(args Args) Expression

func BitwiseNot

func BitwiseNot(args Args) Expression

func BitwiseOr

func BitwiseOr(args Args) Expression

func BitwiseOrAgg

func BitwiseOrAgg(args Args) Expression

func BitwiseRightShift

func BitwiseRightShift(args Args) Expression

func BitwiseXor

func BitwiseXor(args Args) Expression

func BitwiseXorAgg

func BitwiseXorAgg(args Args) Expression

func Block

func Block(args Args) Expression

func BlockCompressionProperty

func BlockCompressionProperty(args Args) Expression

func Booland

func Booland(args Args) Expression

func Boolean

func Boolean(args Args) Expression

func Boolnot

func Boolnot(args Args) Expression

func Boolor

func Boolor(args Args) Expression

func Bracket

func Bracket(args Args) Expression

func BuildProperty

func BuildProperty(args Args) Expression

func ByteLength

func ByteLength(args Args) Expression

func ByteString

func ByteString(args Args) Expression

ByteString ports exp.ByteString (expressions/query.py:485-487, is_primitive=True): a byte-string literal, e.g. postgres `e'\n'`.

func CTE

func CTE(args Args) Expression

func Cache

func Cache(args Args) Expression

Cache/Uncache back Spark's `CACHE [LAZY] TABLE x [OPTIONS(k = v)] [AS <query>]` / `UNCACHE TABLE [IF EXISTS] x` (core.py:1583-1594). Both are plain Expression subclasses, so each is a one-line constructor per the node-model convention (AGENTS.md:34-43).

func CalledOnNullInputProperty

func CalledOnNullInputProperty(args Args) Expression

func Case

func Case(args Args) Expression

func CaseBlock

func CaseBlock(args Args) Expression

func CaseSpecificColumnConstraint

func CaseSpecificColumnConstraint(args Args) Expression

func CaseStatement

func CaseStatement(args Args) Expression

func Cast

func Cast(args Args) Expression

func CastToStrType

func CastToStrType(args Args) Expression

func Cbrt

func Cbrt(args Args) Expression

func Ceil

func Ceil(args Args) Expression

func CharacterSetColumnConstraint

func CharacterSetColumnConstraint(args Args) Expression

func CharacterSetProperty

func CharacterSetProperty(args Args) Expression

func CheckColumnConstraint

func CheckColumnConstraint(args Args) Expression

func ChecksumProperty

func ChecksumProperty(args Args) Expression

func Chr

func Chr(args Args) Expression

Chr ports exp.Chr (string.py:23-26): `class Chr(Expression, Func)`, arg_types= {"expressions": True, "charset": False}, is_var_len_args=True, _sql_names=["CHR", "CHAR"]. Built directly by parser.parseChar (special USING-clause grammar), not via FromArgList.

func CityHash64

func CityHash64(args Args) Expression

func Cluster

func Cluster(args Args) Expression

func ClusterProperty

func ClusterProperty(args Args) Expression

func ClusteredByProperty

func ClusteredByProperty(args Args) Expression

ClusteredByProperty ports exp.ClusteredByProperty (.reference/sqlglot-v30.12.0/sqlglot/expressions/properties.py:230-231).

func ClusteredColumnConstraint

func ClusteredColumnConstraint(args Args) Expression

ClusteredColumnConstraint ports exp.ClusteredColumnConstraint (expressions/constraints.py:64).

func Coalesce

func Coalesce(args Args) Expression

func Collate

func Collate(args Args) Expression

Builders for the affix/connector-operator cluster (see the KindCollate block comment in kinds.go for exact upstream line numbers): COLLATE, unary bitwise-not (~), PIPE_SLASH/ DPIPE_SLASH (|/, ||/ -> SQRT/CBRT), the << >> bitwise-shift operators, and mysql's XOR.

func CollateColumnConstraint

func CollateColumnConstraint(args Args) Expression

func CollateProperty

func CollateProperty(args Args) Expression

func Collation

func Collation(args Args) Expression

func Column

func Column(args Args) Expression

func ColumnConstraint

func ColumnConstraint(args Args) Expression

Builders for the CREATE-table constraint node family (see the block comment above the Kind consts in kinds.go for the upstream constraints.py line references); each is a one-line constructor per the node-model convention (AGENTS.md:34-43).

func ColumnDef

func ColumnDef(args Args) Expression

func ColumnPosition

func ColumnPosition(args Args) Expression

Builders for the ALTER TABLE/VIEW/INDEX and DROP node family (ddl.py:241-401), plus ColumnPosition/AddPartition/DropPartition (query.py:498,1941,1949); see the Kind block comment in kinds.go for the full upstream reference.

func ColumnPrefix

func ColumnPrefix(args Args) Expression

func Column_

func Column_(col any, table any, schema any, catalog any, fields []any, quoted ...bool) Expression

func Columns

func Columns(args Args) Expression

func ColumnsToDot

func ColumnsToDot(root Expression) Expression

ColumnsToDot mirrors the transform in _parse_column_ops (parser.py:6796-6799):

this.transform(lambda n: n.to_dot(include_dots=False) if isinstance(n, exp.Column) else n)

Every Column descendant (not just the root) is rewritten to its dot form via Column.to_dot(include_dots=False): a Dot chain of the column's ordered parts, or the single part when there is only one. It returns a transformed copy; the input is unmodified.

func CombinedAggFunc

func CombinedAggFunc(args Args) Expression

func CombinedParameterizedAgg

func CombinedParameterizedAgg(args Args) Expression

func Command

func Command(args Args) Expression

func Comment

func Comment(args Args) Expression

func CommentColumnConstraint

func CommentColumnConstraint(args Args) Expression

func Commit

func Commit(args Args) Expression

func Compress

func Compress(args Args) Expression

func CompressColumnConstraint

func CompressColumnConstraint(args Args) Expression

Builders for column-constraint nodes from expressions/constraints.py.

func ComputedColumnConstraint

func ComputedColumnConstraint(args Args) Expression

func Concat

func Concat(args Args) Expression

Concat ports exp.Concat (expressions/string.py:29-31): only built by _parse_primary's adjacent-string-literal rewrite (`'a' 'b'` -> Concat) - see KindConcat's doc.

func ConcatWs

func ConcatWs(args Args) Expression

func Condition

func Condition(expression any, dialect DialectType, copyValue bool) Expression

func ConditionalInsert

func ConditionalInsert(args Args) Expression

func Connect

func Connect(args Args) Expression

func ConnectByRoot

func ConnectByRoot(args Args) Expression

func Constraint

func Constraint(args Args) Expression

func Contains

func Contains(args Args) Expression

func Convert

func Convert(value any, copyValue bool) Expression

func ConvertExpr

func ConvertExpr(args Args) Expression

ConvertExpr ports exp.Convert (expressions/functions.py:89): CONVERT(type, expr[, style]). (Convert is already the value-coercion helper in builders.go.)

func ConvertTimezone

func ConvertTimezone(args Args) Expression

func ConvertToCharset

func ConvertToCharset(args Args) Expression

func Copy

func Copy(args Args) Expression

func CopyParameter

func CopyParameter(args Args) Expression

func Corr

func Corr(args Args) Expression

func Cos

func Cos(args Args) Expression

func Cosh

func Cosh(args Args) Expression

func CosineDistance

func CosineDistance(args Args) Expression

func Cot

func Cot(args Args) Expression

func Count

func Count(args Args) Expression

func CountIf

func CountIf(args Args) Expression

func CovarPop

func CovarPop(args Args) Expression

func CovarSamp

func CovarSamp(args Args) Expression

func Create

func Create(args Args) Expression

func Credentials

func Credentials(args Args) Expression

func Cube

func Cube(args Args) Expression

func CumeDist

func CumeDist(args Args) Expression

func CurrentCatalog

func CurrentCatalog(args Args) Expression

CurrentCatalog ports expressions/functions.py:249-250.

func CurrentDatabase

func CurrentDatabase(args Args) Expression

func CurrentDate

func CurrentDate(args Args) Expression

func CurrentDatetime

func CurrentDatetime(args Args) Expression

func CurrentRole

func CurrentRole(args Args) Expression

func CurrentSchema

func CurrentSchema(args Args) Expression

func CurrentSchemas

func CurrentSchemas(args Args) Expression

func CurrentTime

func CurrentTime(args Args) Expression

func CurrentTimestamp

func CurrentTimestamp(args Args) Expression

CurrentTimestamp ports exp.CurrentTimestamp (expressions/temporal.py:37): NOW() / CURRENT_TIMESTAMP.

func CurrentTimestampLTZ

func CurrentTimestampLTZ(args Args) Expression

CurrentTimestampLTZ ports exp.CurrentTimestampLTZ (expressions/temporal.py:41).

func CurrentTimezone

func CurrentTimezone(args Args) Expression

func CurrentUser

func CurrentUser(args Args) Expression

Niladic system-value function builders wired into NO_PAREN_FUNCTIONS (parser.py:431-438 and the postgres/mysql overrides). CurrentSchema previously had no dedicated builder (it was only reached via mysql's FromArgListFunc for DATABASE/SCHEMA); postgres's bare CURRENT_SCHEMA path needs one.

func CurrentUserId

func CurrentUserId(args Args) Expression

func CurrentVersion

func CurrentVersion(args Args) Expression

CurrentVersion ports expressions/functions.py:317-318.

func DPipe

func DPipe(args Args) Expression

func DataBlocksizeProperty

func DataBlocksizeProperty(args Args) Expression

func DataDeletionProperty

func DataDeletionProperty(args Args) Expression

DataDeletionProperty ports exp.DataDeletionProperty (expressions/properties.py:544).

func DataType

func DataType(args Args) Expression

func DataTypeBuild

func DataTypeBuild(dtype any, dialect DialectType, udt bool, copyValue bool, kwargs Args) (Expression, error)

func DataTypeFromStr

func DataTypeFromStr(dtype string, dialect DialectType, udt bool, kwargs Args) (Expression, error)

func DataTypeParam

func DataTypeParam(args Args) Expression

func Date

func Date(args Args) Expression

func DateAdd

func DateAdd(args Args) Expression

func DateBin

func DateBin(args Args) Expression

func DateDiff

func DateDiff(args Args) Expression

func DateFormatColumnConstraint

func DateFormatColumnConstraint(args Args) Expression

func DateFromParts

func DateFromParts(args Args) Expression

DateFromParts ports exp.DateFromParts (expressions/temporal.py:293).

func DateFromUnixDate

func DateFromUnixDate(args Args) Expression

func DateStrToDate

func DateStrToDate(args Args) Expression

DateStrToDate ports exp.DateStrToDate (expressions/temporal.py:420).

func DateSub

func DateSub(args Args) Expression

func DateToDateStr

func DateToDateStr(args Args) Expression

func DateToDi

func DateToDi(args Args) Expression

func DateTrunc

func DateTrunc(args Args) Expression

DateTrunc ports exp.DateTrunc (expressions/temporal.py:165-186), including the constructor's unit unabbreviation to an uppercase string literal.

func Datetime

func Datetime(args Args) Expression

func Day

func Day(args Args) Expression

func DayOfWeekIso

func DayOfWeekIso(args Args) Expression

DayOfWeekIso ports exp.DayOfWeekIso (expressions/temporal.py:217): Presto's DOW_ISO / DAY_OF_WEEK ISO variant.

func Dayname

func Dayname(args Args) Expression

func Declare

func Declare(args Args) Expression

func DeclareItem

func DeclareItem(args Args) Expression

func Decode

func Decode(args Args) Expression

Decode ports exp.Decode (expressions/string.py:285): DECODE(x, charset[, replace]).

func DefaultColumnConstraint

func DefaultColumnConstraint(args Args) Expression

func DefinerProperty

func DefinerProperty(args Args) Expression

func Degrees

func Degrees(args Args) Expression

func Delete

func Delete(args Args) Expression

func DenseRank

func DenseRank(args Args) Expression

func Describe

func Describe(args Args) Expression

func Detach

func Detach(args Args) Expression

func DiToDate

func DiToDate(args Args) Expression

func DictProperty

func DictProperty(args Args) Expression

func DictRange

func DictRange(args Args) Expression

func DictSubProperty

func DictSubProperty(args Args) Expression

func Directory

func Directory(args Args) Expression

FROM-clause / DML tail cluster builders: Directory (dml.py:187, Hive/Spark `INSERT OVERWRITE [LOCAL] DIRECTORY '...'`), RowFormatDelimitedProperty/RowFormatSerdeProperty/ SerdeProperties (properties.py:405,418,452, the Hive `ROW FORMAT ...` clause used by Directory), and WithTableHint/IndexTableHint (query.py:923,927 - T-SQL `WITH (...)` / MySQL `USE|FORCE|IGNORE INDEX` table hints).

func DistKeyProperty

func DistKeyProperty(args Args) Expression

func DistStyleProperty

func DistStyleProperty(args Args) Expression

func Distance

func Distance(args Args) Expression

Distance ports exp.Distance (expressions/core.py:2154-2155): the postgres `<->` point distance operator.

func DistanceNd

func DistanceNd(args Args) Expression

DistanceNd ports exp.DistanceNd (expressions/core.py:2158-2159): the postgres `<<->>` box distance operator.

func Distinct

func Distinct(args Args) Expression

func Distribute

func Distribute(args Args) Expression

func DistributedByProperty

func DistributedByProperty(args Args) Expression

func Div

func Div(args Args) Expression

func Dot

func Dot(args Args) Expression

func DotBuild

func DotBuild(expressions []Expression) Expression

func DotProduct

func DotProduct(args Args) Expression

func Drop

func Drop(args Args) Expression

func DropPartition

func DropPartition(args Args) Expression

func DropPrimaryKey

func DropPrimaryKey(args Args) Expression

func DuplicateKeyProperty

func DuplicateKeyProperty(args Args) Expression

func EQ

func EQ(args Args) Expression

func Elt

func Elt(args Args) Expression

func Encode

func Encode(args Args) Expression

Encode ports exp.Encode (expressions/string.py:289): ENCODE(x, charset).

func EncodeProperty

func EncodeProperty(args Args) Expression

EncodeProperty/IncludeProperty port exp.EncodeProperty/exp.IncludeProperty (properties.py:586-591): RisingWave's `ENCODE|KEY ENCODE <fmt> (...)` and `INCLUDE <name> [coldef] [AS alias]` CREATE SOURCE/SINK options.

func EndStatement

func EndStatement(args Args) Expression

func EndsWith

func EndsWith(args Args) Expression

func EngineProperty

func EngineProperty(args Args) Expression

func EnviromentProperty

func EnviromentProperty(args Args) Expression

func Escape

func Escape(args Args) Expression

func EuclideanDistance

func EuclideanDistance(args Args) Expression

func Except

func Except(args Args) Expression

func ExcludeColumnConstraint

func ExcludeColumnConstraint(args Args) Expression

func Execute

func Execute(args Args) Expression

Execute ports exp.Execute (expressions/ddl.py:436): EXECUTE <procedure> <args>, optionally capturing a return-status parameter (`@rc = EXEC ...`).

func ExecuteSql

func ExecuteSql(args Args) Expression

ExecuteSql ports exp.ExecuteSql (expressions/ddl.py:444): sp_executesql.

func Exists

func Exists(args Args) Expression

func Exp

func Exp(args Args) Expression

func Explode

func Explode(args Args) Expression

func ExplodingGenerateSeries

func ExplodingGenerateSeries(args Args) Expression

func Export

func Export(args Args) Expression

func ExtendsLeft

func ExtendsLeft(args Args) Expression

func ExtendsRight

func ExtendsRight(args Args) Expression

func ExternalProperty

func ExternalProperty(args Args) Expression

ExternalProperty ports exp.ExternalProperty (.reference/sqlglot-v30.12.0/sqlglot/expressions/properties.py:168-169).

func Extract

func Extract(args Args) Expression

func Factorial

func Factorial(args Args) Expression

func FallbackProperty

func FallbackProperty(args Args) Expression

func FarmFingerprint

func FarmFingerprint(args Args) Expression

func FeaturesAtTime

func FeaturesAtTime(args Args) Expression

func Fetch

func Fetch(args Args) Expression

func FileFormatProperty

func FileFormatProperty(args Args) Expression

FileFormatProperty backs the `FORMAT=<fmt>` option on DESCRIBE (properties.py:176).

func Filter

func Filter(args Args) Expression

func Final

func Final(args Args) Expression

func First

func First(args Args) Expression

First ports exp.First (.reference/sqlglot-v30.12.0/sqlglot/expressions/aggregate.py:125-126).

func FirstValue

func FirstValue(args Args) Expression

FirstValue ports exp.FirstValue (.reference/sqlglot-v30.12.0/sqlglot/expressions/aggregate.py:129-130).

func Flatten

func Flatten(args Args) Expression

func Floor

func Floor(args Args) Expression

func ForClause

func ForClause(args Args) Expression

ForClause ports exp.ForClause (expressions/query.py:919): the FOR XML / FOR JSON / FOR BROWSE query modifier.

func ForIn

func ForIn(args Args) Expression

func ForeignKey

func ForeignKey(args Args) Expression

func Format

func Format(args Args) Expression

func FormatJson

func FormatJson(args Args) Expression

func FormatPhrase

func FormatPhrase(args Args) Expression

func FreespaceProperty

func FreespaceProperty(args Args) Expression

func From

func From(args Args) Expression

func FromArgList

func FromArgList(kind Kind, args []Expression) Expression

func FromBase

func FromBase(args Args) Expression

Redshift function and property nodes (expressions/functions.py, expressions/properties.py).

func FromBase32

func FromBase32(args Args) Expression

func FromBase64

func FromBase64(args Args) Expression

FromBase64 ports exp.FromBase64 (.reference/sqlglot-v30.12.0/sqlglot/expressions/string.py:301-302).

func FromTimeZone

func FromTimeZone(args Args) Expression

func FunctionSpecification

func FunctionSpecification(args Args) Expression

func GT

func GT(args Args) Expression

func GTE

func GTE(args Args) Expression

func GenerateBool

func GenerateBool(args Args) Expression

func GenerateDateArray

func GenerateDateArray(args Args) Expression

func GenerateDouble

func GenerateDouble(args Args) Expression

func GenerateEmbedding

func GenerateEmbedding(args Args) Expression

func GenerateInt

func GenerateInt(args Args) Expression

func GenerateSeries

func GenerateSeries(args Args) Expression

func GenerateTable

func GenerateTable(args Args) Expression

func GenerateText

func GenerateText(args Args) Expression

func GenerateTimestampArray

func GenerateTimestampArray(args Args) Expression

func GeneratedAsIdentityColumnConstraint

func GeneratedAsIdentityColumnConstraint(args Args) Expression

func GeneratedAsRowColumnConstraint

func GeneratedAsRowColumnConstraint(args Args) Expression

func Getbit

func Getbit(args Args) Expression

func Glob

func Glob(args Args) Expression

range-ops cluster builders: parser/parser.go's parseRange/parseIs/columnOperators build these Kinds directly via the constructors below (mirroring e.g. Like/ILike/SimilarTo in core.go). See the KindGlob..KindSoundex const-block comment in kinds.go for the exact upstream class each one ports.

func GlobalProperty

func GlobalProperty(args Args) Expression

func Grant

func Grant(args Args) Expression

func GrantPrincipal

func GrantPrincipal(args Args) Expression

func GrantPrivilege

func GrantPrivilege(args Args) Expression

func Greatest

func Greatest(args Args) Expression

func Group

func Group(args Args) Expression

func GroupConcat

func GroupConcat(args Args) Expression

func Grouping

func Grouping(args Args) Expression

func GroupingSets

func GroupingSets(args Args) Expression

func Having

func Having(args Args) Expression

func HavingMax

func HavingMax(args Args) Expression

func Heredoc

func Heredoc(args Args) Expression

func Hex

func Hex(args Args) Expression

func HexString

func HexString(args Args) Expression

HexString ports exp.HexString (expressions/query.py:480-482, is_primitive=True): a hex-string literal, e.g. `x'FF'` (mysql/postgres) or mysql's bare `0xFF`.

func Hint

func Hint(args Args) Expression

func Hll

func Hll(args Args) Expression

func Hour

func Hour(args Args) Expression

func ILike

func ILike(args Args) Expression

func Identifier

func Identifier(args Args) Expression

func If

func If(args Args) Expression

func IfBlock

func IfBlock(args Args) Expression

func IgnoreNulls

func IgnoreNulls(args Args) Expression

func In

func In(args Args) Expression

func InOutColumnConstraint

func InOutColumnConstraint(args Args) Expression

func IncludeProperty

func IncludeProperty(args Args) Expression

func Index

func Index(args Args) Expression

Index/Opclass back CREATE INDEX (query.py:558-566, core.py:1817-1818): Index's "params" arg is the already-ported IndexParameters node (expressions/constraints.go).

func IndexColumnConstraint

func IndexColumnConstraint(args Args) Expression

func IndexConstraintOption

func IndexConstraintOption(args Args) Expression

func IndexParameters

func IndexParameters(args Args) Expression

func IndexTableHint

func IndexTableHint(args Args) Expression

func InheritsProperty

func InheritsProperty(args Args) Expression

func Initcap

func Initcap(args Args) Expression

func InlineLengthColumnConstraint

func InlineLengthColumnConstraint(args Args) Expression

func InputOutputFormat

func InputOutputFormat(args Args) Expression

InputOutputFormat ports exp.InputOutputFormat (.reference/sqlglot-v30.12.0/sqlglot/expressions/query.py:878-879).

func Insert

func Insert(args Args) Expression

func Install

func Install(args Args) Expression

func Int64

func Int64(args Args) Expression

func IntDiv

func IntDiv(args Args) Expression

func Intersect

func Intersect(args Args) Expression

func Interval

func Interval(args Args) Expression

func IntervalSpan

func IntervalSpan(args Args) Expression

func Into

func Into(args Args) Expression

func InvisibleColumnConstraint

func InvisibleColumnConstraint(args Args) Expression

func Is

func Is(args Args) Expression

func IsAscii

func IsAscii(args Args) Expression

IsAscii ports exp.IsAscii (expressions/string.py:61).

func IsInf

func IsInf(args Args) Expression

func IsNan

func IsNan(args Args) Expression

func IsolatedLoadingProperty

func IsolatedLoadingProperty(args Args) Expression

func Iterate

func Iterate(args Args) Expression

func JSON

func JSON(args Args) Expression

func JSONArray

func JSONArray(args Args) Expression

func JSONArrayAgg

func JSONArrayAgg(args Args) Expression

JSONArrayAgg ports exp.JSONArrayAgg (expressions/json.py:22).

func JSONArrayAppend

func JSONArrayAppend(args Args) Expression

func JSONArrayContains

func JSONArrayContains(args Args) Expression

func JSONArrayInsert

func JSONArrayInsert(args Args) Expression

func JSONBContains

func JSONBContains(args Args) Expression

func JSONBContainsAllTopKeys

func JSONBContainsAllTopKeys(args Args) Expression

func JSONBContainsAnyTopKeys

func JSONBContainsAnyTopKeys(args Args) Expression

func JSONBDeleteAtPath

func JSONBDeleteAtPath(args Args) Expression

func JSONBExtract

func JSONBExtract(args Args) Expression

func JSONBExtractScalar

func JSONBExtractScalar(args Args) Expression

func JSONBPathExists

func JSONBPathExists(args Args) Expression

func JSONBool

func JSONBool(args Args) Expression

func JSONCast

func JSONCast(args Args) Expression

func JSONColumnDef

func JSONColumnDef(args Args) Expression

func JSONExists

func JSONExists(args Args) Expression

func JSONExtract

func JSONExtract(args Args) Expression

func JSONExtractArray

func JSONExtractArray(args Args) Expression

func JSONExtractQuote

func JSONExtractQuote(args Args) Expression

JSONExtractQuote ports expressions/query.py:2062-2066.

func JSONExtractScalar

func JSONExtractScalar(args Args) Expression

func JSONFormat

func JSONFormat(args Args) Expression

JSONFormat ports exp.JSONFormat (expressions/json.py:145): JSON_FORMAT(x).

func JSONKeyValue

func JSONKeyValue(args Args) Expression

func JSONKeys

func JSONKeys(args Args) Expression

func JSONKeysAtDepth

func JSONKeysAtDepth(args Args) Expression

func JSONObject

func JSONObject(args Args) Expression

func JSONObjectAgg

func JSONObjectAgg(args Args) Expression

func JSONPath

func JSONPath(args Args) Expression

func JSONPathFilter added in v0.41.0

func JSONPathFilter(args Args) Expression

func JSONPathKey

func JSONPathKey(args Args) Expression

func JSONPathRecursive added in v0.41.0

func JSONPathRecursive(args Args) Expression

func JSONPathRoot

func JSONPathRoot(args Args) Expression

func JSONPathScript added in v0.41.0

func JSONPathScript(args Args) Expression

func JSONPathSelector added in v0.41.0

func JSONPathSelector(args Args) Expression

func JSONPathSlice added in v0.41.0

func JSONPathSlice(args Args) Expression

func JSONPathSubscript

func JSONPathSubscript(args Args) Expression

func JSONPathUnion added in v0.41.0

func JSONPathUnion(args Args) Expression

func JSONPathWildcard

func JSONPathWildcard(args Args) Expression

func JSONRemove

func JSONRemove(args Args) Expression

func JSONSchema

func JSONSchema(args Args) Expression

func JSONSet

func JSONSet(args Args) Expression

func JSONStripNulls

func JSONStripNulls(args Args) Expression

func JSONTable

func JSONTable(args Args) Expression

func JSONType

func JSONType(args Args) Expression

func JSONValue

func JSONValue(args Args) Expression

func JSONValueArray

func JSONValueArray(args Args) Expression

func JarowinklerSimilarity

func JarowinklerSimilarity(args Args) Expression

func Join

func Join(args Args) Expression

func JoinHint

func JoinHint(args Args) Expression

func JournalProperty

func JournalProperty(args Args) Expression

func JustifyDays

func JustifyDays(args Args) Expression

func JustifyHours

func JustifyHours(args Args) Expression

func JustifyInterval

func JustifyInterval(args Args) Expression

func Kill

func Kill(args Args) Expression

func Kurtosis

func Kurtosis(args Args) Expression

func Kwarg

func Kwarg(args Args) Expression

Kwarg ports exp.Kwarg (expressions/core.py:1920-1922): a named argument `k => v` inside a call (the base LAMBDAS FARROW entry, parser.py:995-999).

func LT

func LT(args Args) Expression

func LTE

func LTE(args Args) Expression

func Lag

func Lag(args Args) Expression

Lag ports exp.Lag (expressions/aggregate.py:150-151): the LAG(this[, offset[, default]]) window function.

func Lambda

func Lambda(args Args) Expression

func LanguageProperty

func LanguageProperty(args Args) Expression

func Last

func Last(args Args) Expression

Last ports exp.Last (.reference/sqlglot-v30.12.0/sqlglot/expressions/aggregate.py:155-156).

func LastDay

func LastDay(args Args) Expression

LastDay ports exp.LastDay (expressions/temporal.py:338).

func LastValue

func LastValue(args Args) Expression

LastValue ports exp.LastValue (.reference/sqlglot-v30.12.0/sqlglot/expressions/aggregate.py:159-160).

func Lateral

func Lateral(args Args) Expression

func Lead

func Lead(args Args) Expression

Lead ports exp.Lead (expressions/aggregate.py:162-163): the LEAD(this[, offset[, default]]) window function.

func Least

func Least(args Args) Expression

func Leave

func Leave(args Args) Expression

func Left

func Left(args Args) Expression

Left ports exp.Left (expressions/string.py:65).

func Length

func Length(args Args) Expression

func Levenshtein

func Levenshtein(args Args) Expression

Levenshtein ports exp.Levenshtein (expressions/string.py:74): LEVENSHTEIN_DISTANCE(a, b).

func Like

func Like(args Args) Expression

func LikeProperty

func LikeProperty(args Args) Expression

func Limit

func Limit(args Args) Expression

func LimitOptions

func LimitOptions(args Args) Expression

func List

func List(args Args) Expression

List ports exp.List (array.py:35-37): the LIST constructor.

func Literal

func Literal(args Args) Expression

func LiteralNumber

func LiteralNumber(number any) Expression

func LiteralString

func LiteralString(s any) Expression

func Ln

func Ln(args Args) Expression

func LoadData

func LoadData(args Args) Expression

func Localtime

func Localtime(args Args) Expression

func Localtimestamp

func Localtimestamp(args Args) Expression

func LocationProperty

func LocationProperty(args Args) Expression

LocationProperty ports exp.LocationProperty (.reference/sqlglot-v30.12.0/sqlglot/expressions/properties.py:262-263).

func Lock

func Lock(args Args) Expression

func LockProperty

func LockProperty(args Args) Expression

func LockingProperty

func LockingProperty(args Args) Expression

func LockingStatement

func LockingStatement(args Args) Expression

func Log

func Log(args Args) Expression

func LogProperty

func LogProperty(args Args) Expression

func LogicalAnd

func LogicalAnd(args Args) Expression

func LogicalOr

func LogicalOr(args Args) Expression

func LoopBlock

func LoopBlock(args Args) Expression

func Lower

func Lower(args Args) Expression

func LowerHex

func LowerHex(args Args) Expression

func MD5

func MD5(args Args) Expression

func MD5Digest

func MD5Digest(args Args) Expression

MD5Digest ports exp.MD5Digest (expressions/string.py:540, is_var_len_args=True): the binary-returning MD5(x) used by Presto (distinct from the hex-string exp.MD5).

func MLForecast

func MLForecast(args Args) Expression

func MLTranslate

func MLTranslate(args Args) Expression

func MakeInterval

func MakeInterval(args Args) Expression

func ManhattanDistance

func ManhattanDistance(args Args) Expression

func Map

func Map(args Args) Expression

func Match

func Match(args Args) Expression

func MatchAgainst

func MatchAgainst(args Args) Expression

func MatchRecognize

func MatchRecognize(args Args) Expression

func MatchRecognizeMeasure

func MatchRecognizeMeasure(args Args) Expression

func MaterializedProperty

func MaterializedProperty(args Args) Expression

func Max

func Max(args Args) Expression

func MaybeParse

func MaybeParse(sqlOrExpression any, dialect DialectType, copyValue bool) Expression

func Median

func Median(args Args) Expression

func Merge

func Merge(args Args) Expression

func MergeBlockRatioProperty

func MergeBlockRatioProperty(args Args) Expression

func MergeTreeTTL

func MergeTreeTTL(args Args) Expression

func MergeTreeTTLAction

func MergeTreeTTLAction(args Args) Expression

func Min

func Min(args Args) Expression

func Minute

func Minute(args Args) Expression

func Mod

func Mod(args Args) Expression

func ModifyColumn

func ModifyColumn(args Args) Expression

func ModuleProperty

func ModuleProperty(args Args) Expression

func Month

func Month(args Args) Expression

func Monthname

func Monthname(args Args) Expression

func MonthsBetween

func MonthsBetween(args Args) Expression

func Mul

func Mul(args Args) Expression

func MultitableInserts

func MultitableInserts(args Args) Expression

func NEQ

func NEQ(args Args) Expression

func Nanvl

func Nanvl(args Args) Expression

func National

func National(args Args) Expression

National ports exp.National (expressions/query.py:585-586, is_primitive=True): a national-character string literal, e.g. N'abc'.

func Neg

func Neg(args Args) Expression

func Negative

func Negative(args Args) Expression

func NestedJSONSelect

func NestedJSONSelect(args Args) Expression

func NetFunc

func NetFunc(args Args) Expression

func New

func New(k Kind, args Args) Expression

func NextDay

func NextDay(args Args) Expression

func NextValueFor

func NextValueFor(args Args) Expression

NextValueFor ports exp.NextValueFor (expressions/ddl.py:432).

func NoPrimaryIndexProperty

func NoPrimaryIndexProperty(args Args) Expression

func NonClusteredColumnConstraint

func NonClusteredColumnConstraint(args Args) Expression

NonClusteredColumnConstraint ports exp.NonClusteredColumnConstraint (expressions/constraints.py:139).

func Normalize

func Normalize(args Args) Expression

func Not

func Not(args Args) Expression

func NotForReplicationColumnConstraint

func NotForReplicationColumnConstraint(args Args) Expression

func NotNullColumnConstraint

func NotNullColumnConstraint(args Args) Expression

func Not_

func Not_(expression Expression, copyValue bool) Expression

func NthValue

func NthValue(args Args) Expression

func Ntile

func Ntile(args Args) Expression

func Null

func Null() Expression

func NullSafeEQ

func NullSafeEQ(args Args) Expression

func NullSafeNEQ

func NullSafeNEQ(args Args) Expression

func Nullif

func Nullif(args Args) Expression

func NumberToStr

func NumberToStr(args Args) Expression

NumberToStr ports exp.NumberToStr (expressions/string.py:97).

func ObjectIdentifier

func ObjectIdentifier(args Args) Expression

func ObjectTransform

func ObjectTransform(args Args) Expression

func Offset

func Offset(args Args) Expression

func OnCluster

func OnCluster(args Args) Expression

func OnCommitProperty

func OnCommitProperty(args Args) Expression

func OnCondition

func OnCondition(args Args) Expression

func OnConflict

func OnConflict(args Args) Expression

func OnProperty

func OnProperty(args Args) Expression

func OnUpdateColumnConstraint

func OnUpdateColumnConstraint(args Args) Expression

func Opclass

func Opclass(args Args) Expression

func OpenJSON

func OpenJSON(args Args) Expression

OpenJSON ports exp.OpenJSON (expressions/json.py:235).

func OpenJSONColumnDef

func OpenJSONColumnDef(args Args) Expression

OpenJSONColumnDef ports exp.OpenJSONColumnDef (expressions/query.py:2070).

func Operator

func Operator(args Args) Expression

func Or

func Or(args Args) Expression

func Or_

func Or_(expressions ...Expression) Expression

func Order

func Order(args Args) Expression

func Ordered

func Ordered(args Args) Expression

func OverflowTruncateBehavior

func OverflowTruncateBehavior(args Args) Expression

OverflowTruncateBehavior ports expressions/query.py:1961-1962.

func Overlaps

func Overlaps(args Args) Expression

func Overlay

func Overlay(args Args) Expression

func Pad

func Pad(args Args) Expression

func Parameter

func Parameter(args Args) Expression

func ParameterizedAgg

func ParameterizedAgg(args Args) Expression

func Paren

func Paren(args Args) Expression

func ParseDatetime

func ParseDatetime(args Args) Expression

func ParseIdentifier

func ParseIdentifier(name IdentifierName, dialect DialectType) Expression

func ParseJSON

func ParseJSON(args Args) Expression

func ParseTime

func ParseTime(args Args) Expression

func Partition

func Partition(args Args) Expression

func PartitionBoundSpec

func PartitionBoundSpec(args Args) Expression

func PartitionByListProperty

func PartitionByListProperty(args Args) Expression

func PartitionByRangeProperty

func PartitionByRangeProperty(args Args) Expression

func PartitionByRangePropertyDynamic

func PartitionByRangePropertyDynamic(args Args) Expression

func PartitionId

func PartitionId(args Args) Expression

func PartitionList

func PartitionList(args Args) Expression

func PartitionRange

func PartitionRange(args Args) Expression

Builders for partition and ANALYZE nodes from expressions/query.py.

func PartitionedByProperty

func PartitionedByProperty(args Args) Expression

func PartitionedOfProperty

func PartitionedOfProperty(args Args) Expression

func PathColumnConstraint

func PathColumnConstraint(args Args) Expression

PathColumnConstraint ports exp.PathColumnConstraint (constraints.py:185), the `PATH '<p>'` column constraint (parsed via the shared constraintParsers "PATH" entry; see the KindPathColumnConstraint comment in kinds.go).

func PercentRank

func PercentRank(args Args) Expression

func PercentileCont

func PercentileCont(args Args) Expression

func PercentileDisc

func PercentileDisc(args Args) Expression

func PeriodForSystemTimeConstraint

func PeriodForSystemTimeConstraint(args Args) Expression

PeriodForSystemTimeConstraint ports exp.PeriodForSystemTimeConstraint (expressions/constraints.py:44).

func Pi

func Pi(args Args) Expression

func Pivot

func Pivot(args Args) Expression

func PivotAlias

func PivotAlias(args Args) Expression

func PivotAny

func PivotAny(args Args) Expression

func Placeholder

func Placeholder(args Args) Expression

func PositionalColumn

func PositionalColumn(args Args) Expression

func Pow

func Pow(args Args) Expression

func Pragma

func Pragma(args Args) Expression

func PreWhere

func PreWhere(args Args) Expression

func Predict

func Predict(args Args) Expression

func PrevValueFor

func PrevValueFor(args Args) Expression

func PrimaryKey

func PrimaryKey(args Args) Expression

func PrimaryKeyColumnConstraint

func PrimaryKeyColumnConstraint(args Args) Expression

func Prior

func Prior(args Args) Expression

func ProjectionDef

func ProjectionDef(args Args) Expression

func Properties

func Properties(args Args) Expression

Properties is the generic property-list container (properties.py:590-591, `arg_types = {"expressions": True}`).

func Property

func Property(args Args) Expression

Builders for CREATE/ALTER property nodes from expressions/properties.py.

func PropertyEQ

func PropertyEQ(args Args) Expression

PropertyEQ ports exp.PropertyEQ (expressions/core.py:2150-2151): the ASSIGNMENT `:=` operator (parser.py:881-883), e.g. mysql `SELECT @var1 := 1`.

func PseudoType

func PseudoType(args Args) Expression

PseudoType/ObjectIdentifier port exp.PseudoType/exp.ObjectIdentifier (datatypes.py: 439-444): DataType subclasses whose "this" holds the raw uppercased token text (e.g. "CSTRING"/"REGCLASS") rather than a DType constant.

func Qualify

func Qualify(args Args) Expression

func Quantile

func Quantile(args Args) Expression

func Quarter

func Quarter(args Args) Expression

func QueryBand

func QueryBand(args Args) Expression

func QueryOption

func QueryOption(args Args) Expression

QueryOption ports exp.QueryOption (expressions/query.py:914): one OPTION (...) / FOR XML|JSON option.

func QueryTransform

func QueryTransform(args Args) Expression

QueryTransform ports exp.QueryTransform (.reference/sqlglot-v30.12.0/sqlglot/expressions/properties.py:422-431).

func Radians

func Radians(args Args) Expression

func Rand

func Rand(args Args) Expression

func Randn

func Randn(args Args) Expression

func Randstr

func Randstr(args Args) Expression

func RangeN

func RangeN(args Args) Expression

func Rank

func Rank(args Args) Expression

func RawString

func RawString(args Args) Expression

func ReadParquet

func ReadParquet(args Args) Expression

func RecursiveWithSearch

func RecursiveWithSearch(args Args) Expression

func Reduce

func Reduce(args Args) Expression

Spark/Databricks function nodes (expressions/{array,math,aggregate,json,temporal, functions,string}.py) and the Databricks TIMESERIES key constraint (expressions/constraints.py:224).

func Reference

func Reference(args Args) Expression

func Refresh

func Refresh(args Args) Expression

Refresh ports expressions/core.py:1596-1597.

func RefreshTriggerProperty

func RefreshTriggerProperty(args Args) Expression

func RegexpCount

func RegexpCount(args Args) Expression

func RegexpExtract

func RegexpExtract(args Args) Expression

RegexpExtract ports exp.RegexpExtract (.reference/sqlglot-v30.12.0/sqlglot/expressions/string.py:421-430).

func RegexpExtractAll

func RegexpExtractAll(args Args) Expression

RegexpExtractAll ports exp.RegexpExtractAll (.reference/sqlglot-v30.12.0/sqlglot/expressions/string.py:433-441).

func RegexpFullMatch

func RegexpFullMatch(args Args) Expression

func RegexpILike

func RegexpILike(args Args) Expression

func RegexpInstr

func RegexpInstr(args Args) Expression

func RegexpLike

func RegexpLike(args Args) Expression

func RegexpReplace

func RegexpReplace(args Args) Expression

func RegexpSplit

func RegexpSplit(args Args) Expression

func RegexpSubstr

func RegexpSubstr(args Args) Expression

func RegrAvgx

func RegrAvgx(args Args) Expression

func RegrAvgy

func RegrAvgy(args Args) Expression

func RegrCount

func RegrCount(args Args) Expression

func RegrIntercept

func RegrIntercept(args Args) Expression

func RegrR2

func RegrR2(args Args) Expression

func RegrSlope

func RegrSlope(args Args) Expression

func RegrSxx

func RegrSxx(args Args) Expression

func RegrSxy

func RegrSxy(args Args) Expression

func RegrSyy

func RegrSyy(args Args) Expression

func RenameColumn

func RenameColumn(args Args) Expression

func RenameIndex

func RenameIndex(args Args) Expression

func Repeat

func Repeat(args Args) Expression

Repeat ports exp.Repeat (expressions/string.py:109).

func RepeatBlock

func RepeatBlock(args Args) Expression

func Replace

func Replace(args Args) Expression

func ReplacePartition

func ReplacePartition(args Args) Expression

func Reset

func Reset(args Args) Expression

func RespectNulls

func RespectNulls(args Args) Expression

func Return

func Return(args Args) Expression

Return wraps a UDF/procedure body in `RETURN <expr>` (query.py:882-883).

func Returning

func Returning(args Args) Expression

func ReturnsProperty

func ReturnsProperty(args Args) Expression

ReturnsProperty/LanguageProperty/SqlSecurityProperty/CalledOnNullInputProperty/ StrictProperty/StabilityProperty/SetConfigProperty/CharacterSetProperty/RowFormatProperty back the CREATE FUNCTION/TABLE tail properties this slice supports (properties.py:74,222, 393,397,401,456ish,464,480 - see the kinds.go block comment for exact line references).

func Reverse

func Reverse(args Args) Expression

func Revoke

func Revoke(args Args) Expression
func Right(args Args) Expression

Right ports exp.Right (expressions/string.py:121).

func Rint

func Rint(args Args) Expression

func Rollback

func Rollback(args Args) Expression

func Rollup

func Rollup(args Args) Expression

func RollupIndex

func RollupIndex(args Args) Expression

func RollupProperty

func RollupProperty(args Args) Expression

func Round

func Round(args Args) Expression

func RowFormatDelimitedProperty

func RowFormatDelimitedProperty(args Args) Expression

func RowFormatProperty

func RowFormatProperty(args Args) Expression

func RowFormatSerdeProperty

func RowFormatSerdeProperty(args Args) Expression

func RowNumber

func RowNumber(args Args) Expression

func SHA

func SHA(args Args) Expression

SHA ports exp.SHA (expressions/string.py:569).

func SHA1Digest

func SHA1Digest(args Args) Expression

SHA1Digest ports exp.SHA1Digest (expressions/string.py:573).

func SHA2

func SHA2(args Args) Expression

SHA2 ports exp.SHA2 (expressions/string.py:562): the hex-string SHA2(x, length).

func SHA2Digest

func SHA2Digest(args Args) Expression

SHA2Digest ports exp.SHA2Digest (expressions/string.py:582): the binary-returning SHA256/SHA512 digest used by Presto.

func SafeAdd

func SafeAdd(args Args) Expression

func SafeDivide

func SafeDivide(args Args) Expression

func SafeFunc

func SafeFunc(args Args) Expression

func SafeMultiply

func SafeMultiply(args Args) Expression

func SafeSubtract

func SafeSubtract(args Args) Expression

func SampleProperty

func SampleProperty(args Args) Expression

func Savepoint

func Savepoint(args Args) Expression

func Schema

func Schema(args Args) Expression

func SchemaCommentProperty

func SchemaCommentProperty(args Args) Expression

func ScopeResolution

func ScopeResolution(args Args) Expression

ScopeResolution ports exp.ScopeResolution (expressions/query.py:2081): T-SQL's `::` scope-resolution operator (`schema::function`).

func Search(args Args) Expression

func Sec

func Sec(args Args) Expression

func Second

func Second(args Args) Expression

func Secret

func Secret(args Args) Expression

func Select

func Select(args Args) Expression

func SelectQuery

func SelectQuery(expressions ...Expression) Expression

SelectQuery ports the module-level select builder (expressions/builders.py:63-80) for expression projections: a new Select with the given projections.

func Semicolon

func Semicolon(args Args) Expression

func SequenceProperties

func SequenceProperties(args Args) Expression

SequenceProperties ports exp.SequenceProperties (expressions/ddl.py:64-73).

func SerdeProperties

func SerdeProperties(args Args) Expression

func SessionParameter

func SessionParameter(args Args) Expression

SessionParameter ports exp.SessionParameter (expressions/core.py:1837-1838): mysql `@@GLOBAL.max_connections` / bare `@@x` session-variable reference.

func SessionUser

func SessionUser(args Args) Expression

func Set

func Set(args Args) Expression

Builders for the 19 statement-family Kinds (see the block comment in kinds.go for the upstream class/line references); each is a one-line constructor per the node-model convention (AGENTS.md:34-43).

func SetConfigProperty

func SetConfigProperty(args Args) Expression

func SetItem

func SetItem(args Args) Expression

func SetProperty

func SetProperty(args Args) Expression

Teradata CREATE TABLE properties (properties.py: exp.SetProperty .. exp.VolatileProperty), dispatched from _parse_property_before / PROPERTY_PARSERS (parser.py:2855-2881, 3171-3240).

func SettingsProperty

func SettingsProperty(args Args) Expression

func Show

func Show(args Args) Expression

func Shuffle

func Shuffle(args Args) Expression

func Sign

func Sign(args Args) Expression

func SimilarTo

func SimilarTo(args Args) Expression

func Sin

func Sin(args Args) Expression

func Sinh

func Sinh(args Args) Expression

func Skewness

func Skewness(args Args) Expression

func SkipJSONColumn

func SkipJSONColumn(args Args) Expression

func Slice

func Slice(args Args) Expression

Slice ports exp.Slice (expressions/core.py:2017-2018): the `start:end:step` triple inside a bracket subscript, e.g. x[1:2].

func Sort

func Sort(args Args) Expression

func SortArray

func SortArray(args Args) Expression

func SortKeyProperty

func SortKeyProperty(args Args) Expression

func Soundex

func Soundex(args Args) Expression

func Space

func Space(args Args) Expression

func Split

func Split(args Args) Expression

func SplitPart

func SplitPart(args Args) Expression

SplitPart ports exp.SplitPart (expressions/string.py:174).

func SqlReadWriteProperty

func SqlReadWriteProperty(args Args) Expression

func SqlSecurityProperty

func SqlSecurityProperty(args Args) Expression

func Sqrt

func Sqrt(args Args) Expression

func StDistance

func StDistance(args Args) Expression

func StPoint

func StPoint(args Args) Expression

func StabilityProperty

func StabilityProperty(args Args) Expression

func StandardHash

func StandardHash(args Args) Expression

func Star

func Star(args Args) Expression

func StarMap

func StarMap(args Args) Expression

StarMap ports exp.StarMap (.reference/sqlglot-v30.12.0/sqlglot/expressions/array.py:331-332).

func StartsWith

func StartsWith(args Args) Expression

func Stddev

func Stddev(args Args) Expression

func StddevPop

func StddevPop(args Args) Expression

func StddevSamp

func StddevSamp(args Args) Expression

func StorageHandlerProperty

func StorageHandlerProperty(args Args) Expression

StorageHandlerProperty ports exp.StorageHandlerProperty (.reference/sqlglot-v30.12.0/sqlglot/expressions/properties.py:488-489).

func StoredProcedure

func StoredProcedure(args Args) Expression

StoredProcedure ports exp.StoredProcedure (expressions/query.py:2115).

func StrPosition

func StrPosition(args Args) Expression

func StrToDate

func StrToDate(args Args) Expression

StrToDate/StrToTime/StrToUnix/TimeStrToDate/TimeStrToTime/TimeStrToUnix port the STR_TO_*/TIME_STR_TO_* temporal family (expressions/temporal.py:452-473), each a plain one-line constructor mirroring e.g. json.go's JSONExtract/JSONCast builders above.

func StrToMap

func StrToMap(args Args) Expression

StrToMap ports exp.StrToMap (expressions/string.py:203): SPLIT_TO_MAP(x, kd, vd).

func StrToTime

func StrToTime(args Args) Expression

func StrToUnix

func StrToUnix(args Args) Expression

func Stream

func Stream(args Args) Expression

func StrictProperty

func StrictProperty(args Args) Expression

func String

func String(args Args) Expression

func StringToArray

func StringToArray(args Args) Expression

func StrtokToArray

func StrtokToArray(args Args) Expression

func Struct

func Struct(args Args) Expression

func StructExtract

func StructExtract(args Args) Expression

func Stuff

func Stuff(args Args) Expression

func Sub

func Sub(args Args) Expression

func Subquery

func Subquery(args Args) Expression

func Substring

func Substring(args Args) Expression

func SubstringIndex

func SubstringIndex(args Args) Expression

func Sum

func Sum(args Args) Expression

func Summarize

func Summarize(args Args) Expression

func Systimestamp

func Systimestamp(args Args) Expression

func Table

func Table(args Args) Expression

func TableAlias

func TableAlias(args Args) Expression

func TableColumn

func TableColumn(args Args) Expression

func TableSample

func TableSample(args Args) Expression

TableSample ports exp.TableSample (query.py:1723-1733): the `TABLESAMPLE (...)` modifier attached to a table/subquery source's already-wired "sample" arg key.

func Table_

func Table_(table, schema, catalog any, quoted *bool, alias any) Expression

func Tan

func Tan(args Args) Expression

func Tanh

func Tanh(args Args) Expression

func TemporaryProperty

func TemporaryProperty(args Args) Expression

func Time

func Time(args Args) Expression

func TimeAdd

func TimeAdd(args Args) Expression

func TimeDiff

func TimeDiff(args Args) Expression

func TimeFromParts

func TimeFromParts(args Args) Expression

TimeFromParts ports exp.TimeFromParts (expressions/temporal.py:367).

func TimeSlice

func TimeSlice(args Args) Expression

func TimeStrToDate

func TimeStrToDate(args Args) Expression

func TimeStrToTime

func TimeStrToTime(args Args) Expression

func TimeStrToUnix

func TimeStrToUnix(args Args) Expression

func TimeToStr

func TimeToStr(args Args) Expression

TimeToStr ports exp.TimeToStr (.reference/sqlglot-v30.12.0/sqlglot/expressions/temporal.py:476-477).

func TimeToTimeStr

func TimeToTimeStr(args Args) Expression

func TimeToUnix

func TimeToUnix(args Args) Expression

TimeToUnix ports exp.TimeToUnix (expressions/temporal.py:484): TO_UNIXTIME(x).

func TimeUnitVar

func TimeUnitVar(unit Expression) Expression

TimeUnitVar ports the TimeUnit constructor (expressions/core.py:2055-2066): a literal, var or single-part column unit becomes an uppercase, unabbreviated Var; anything else passes through.

func TimeseriesKey

func TimeseriesKey(args Args) Expression

func Timestamp

func Timestamp(args Args) Expression

func TimestampAdd

func TimestampAdd(args Args) Expression

TimestampAdd ports exp.TimestampAdd (expressions/temporal.py:132).

func TimestampDiff

func TimestampDiff(args Args) Expression

func TimestampFromParts

func TimestampFromParts(args Args) Expression

TimestampFromParts ports exp.TimestampFromParts (expressions/temporal.py:384).

func TimestampLtzFromParts

func TimestampLtzFromParts(args Args) Expression

func TimestampSub

func TimestampSub(args Args) Expression

func TimestampTrunc

func TimestampTrunc(args Args) Expression

TimestampTrunc ports exp.TimestampTrunc (.reference/sqlglot-v30.12.0/sqlglot/expressions/temporal.py:190-191).

func TimestampTzFromParts

func TimestampTzFromParts(args Args) Expression

func TitleColumnConstraint

func TitleColumnConstraint(args Args) Expression

func ToArray

func ToArray(args Args) Expression

func ToBase32

func ToBase32(args Args) Expression

func ToBase64

func ToBase64(args Args) Expression

ToBase64 ports exp.ToBase64 (.reference/sqlglot-v30.12.0/sqlglot/expressions/string.py:325-326).

func ToBinary

func ToBinary(args Args) Expression

func ToBoolean

func ToBoolean(args Args) Expression

func ToChar

func ToChar(args Args) Expression

func ToDouble

func ToDouble(args Args) Expression

func ToFile

func ToFile(args Args) Expression

func ToIdentifier

func ToIdentifier(name any, quoted ...bool) Expression

func ToMap

func ToMap(args Args) Expression

ToMap ports exp.ToMap (array.py:340-341): materialize's MAP[...] / MAP(...) constructor.

func ToNumber

func ToNumber(args Args) Expression

func ToTable

func ToTable(sqlPath any, dialect DialectType, copyValue bool, kwargs Args) (Expression, error)

func Transaction

func Transaction(args Args) Expression

func Transform

func Transform(args Args) Expression

Transform ports exp.Transform (.reference/sqlglot-v30.12.0/sqlglot/expressions/array.py:214-215).

func TranslateCharacters

func TranslateCharacters(args Args) Expression

func TriggerEvent

func TriggerEvent(args Args) Expression

func TriggerExecute

func TriggerExecute(args Args) Expression

func TriggerProperties

func TriggerProperties(args Args) Expression

TriggerProperties/TriggerExecute/TriggerEvent/TriggerReferencing back CREATE TRIGGER (ddl.py:76-101).

func TriggerReferencing

func TriggerReferencing(args Args) Expression

func Trim

func Trim(args Args) Expression

func True_

func True_() Expression

True_ ports exp.true (expressions/builders.py:1079-1088).

func TruncateTable

func TruncateTable(args Args) Expression

func TryCast

func TryCast(args Args) Expression

func TsOrDiToDi

func TsOrDiToDi(args Args) Expression

func TsOrDsAdd

func TsOrDsAdd(args Args) Expression

TsOrDsAdd ports exp.TsOrDsAdd (.reference/sqlglot-v30.12.0/sqlglot/expressions/temporal.py:145-147).

func TsOrDsDiff

func TsOrDsDiff(args Args) Expression

TsOrDsDiff ports exp.TsOrDsDiff (expressions/temporal.py:154).

func TsOrDsToDate

func TsOrDsToDate(args Args) Expression

TsOrDsToDate ports exp.TsOrDsToDate (.reference/sqlglot-v30.12.0/sqlglot/expressions/temporal.py:492-493).

func TsOrDsToDateStr

func TsOrDsToDateStr(args Args) Expression

func TsOrDsToDatetime

func TsOrDsToDatetime(args Args) Expression

func TsOrDsToTime

func TsOrDsToTime(args Args) Expression

func TsOrDsToTimestamp

func TsOrDsToTimestamp(args Args) Expression

func Tuple

func Tuple(args Args) Expression

func Typeof

func Typeof(args Args) Expression

func Uncache

func Uncache(args Args) Expression

func Undrop

func Undrop(args Args) Expression

func Unhex

func Unhex(args Args) Expression

Unhex ports exp.Unhex (expressions/string.py:405): FROM_HEX(x).

func Unicode

func Unicode(args Args) Expression

func UnicodeString

func UnicodeString(args Args) Expression

UnicodeString ports exp.UnicodeString (expressions/query.py:494, is_primitive=True): a `U&'...'` unicode string literal. Unlike the Func Kinds above it is a plain Condition (no TraitFunc), so it has no functionFallbackSQL path - the generator supplies a dedicated dispatch method (mirrors National's `N'...'`).

func Uniform

func Uniform(args Args) Expression

func Union

func Union(args Args) Expression

func UniqueColumnConstraint

func UniqueColumnConstraint(args Args) Expression

func UniqueKeyProperty

func UniqueKeyProperty(args Args) Expression

StarRocks nodes.

func UnixDate

func UnixDate(args Args) Expression

func UnixMicros

func UnixMicros(args Args) Expression

func UnixMillis

func UnixMillis(args Args) Expression

func UnixToStr

func UnixToStr(args Args) Expression

UnixToStr ports exp.UnixToStr (.reference/sqlglot-v30.12.0/sqlglot/expressions/temporal.py:528-529).

func UnixToTime

func UnixToTime(args Args) Expression

UnixToTime ports exp.UnixToTime (expressions/temporal.py:532): FROM_UNIXTIME(x[, ...]).

func UnixToTimeStr

func UnixToTimeStr(args Args) Expression

func Unload

func Unload(args Args) Expression

func UnloggedProperty

func UnloggedProperty(args Args) Expression

func Unnest

func Unnest(args Args) Expression

func UnpivotColumns

func UnpivotColumns(args Args) Expression

func Update

func Update(args Args) Expression

func UppercaseColumnConstraint

func UppercaseColumnConstraint(args Args) Expression

func Use

func Use(args Args) Expression

func UserDefinedFunction

func UserDefinedFunction(args Args) Expression

UserDefinedFunction backs a CREATE FUNCTION/PROCEDURE signature, e.g. `f(a INT, b INT)` (ddl.py:225-226).

func UsingData

func UsingData(args Args) Expression

func UsingProperty

func UsingProperty(args Args) Expression

UsingProperty ports exp.UsingProperty (.reference/sqlglot-v30.12.0/sqlglot/expressions/properties.py:492-494).

func UtcDate

func UtcDate(args Args) Expression

func UtcTime

func UtcTime(args Args) Expression

func UtcTimestamp

func UtcTimestamp(args Args) Expression

func Uuid

func Uuid(args Args) Expression

Uuid ports exp.Uuid (expressions/functions.py:534).

func UuidProperty

func UuidProperty(args Args) Expression

func Values

func Values(args Args) Expression

func Var

func Var(args Args) Expression

func VarMap

func VarMap(args Args) Expression

VarMap ports exp.VarMap (.reference/sqlglot-v30.12.0/sqlglot/expressions/array.py:339-341).

func Variadic

func Variadic(args Args) Expression

func Variance

func Variance(args Args) Expression

func VariancePop

func VariancePop(args Args) Expression

func VectorSearch

func VectorSearch(args Args) Expression

func Version

func Version(args Args) Expression

func VirtualProperty

func VirtualProperty(args Args) Expression

func VolatileProperty

func VolatileProperty(args Args) Expression

VolatileProperty ports exp.VolatileProperty (expressions/properties.py:556).

func WatermarkColumnConstraint

func WatermarkColumnConstraint(args Args) Expression

WatermarkColumnConstraint ports exp.WatermarkColumnConstraint (constraints.py:181-182): RisingWave's `WATERMARK FOR <col> AS <expr>` column option.

func Week

func Week(args Args) Expression

func WeekStart

func WeekStart(args Args) Expression

func When

func When(args Args) Expression

func Whens

func Whens(args Args) Expression

func Where

func Where(args Args) Expression

func WhileBlock

func WhileBlock(args Args) Expression

func WidthBucket

func WidthBucket(args Args) Expression

func Window

func Window(args Args) Expression

func WindowSpec

func WindowSpec(args Args) Expression

func With

func With(args Args) Expression

func WithDataProperty

func WithDataProperty(args Args) Expression

func WithFill

func WithFill(args Args) Expression

func WithJournalTableProperty

func WithJournalTableProperty(args Args) Expression

func WithOperator

func WithOperator(args Args) Expression

func WithSystemVersioningProperty

func WithSystemVersioningProperty(args Args) Expression

WithSystemVersioningProperty ports exp.WithSystemVersioningProperty (expressions/properties.py:572).

func WithTableHint

func WithTableHint(args Args) Expression

func WithinGroup

func WithinGroup(args Args) Expression

func XMLElement

func XMLElement(args Args) Expression

XMLElement/XMLTable port exp.XMLElement/exp.XMLTable (Expression, Func) (functions.py:439,453). XMLNamespace ports exp.XMLNamespace (query.py:2081-2082), a plain Expression subclass.

func XMLKeyValueOption

func XMLKeyValueOption(args Args) Expression

XMLKeyValueOption ports exp.XMLKeyValueOption (expressions/query.py:2097): a FOR XML option with an optional parenthesized value.

func XMLNamespace

func XMLNamespace(args Args) Expression

func XMLTable

func XMLTable(args Args) Expression

func Xor

func Xor(args Args) Expression

func Year

func Year(args Args) Expression

func YearOfWeek

func YearOfWeek(args Args) Expression

func YearOfWeekIso

func YearOfWeekIso(args Args) Expression

func ZeroFillColumnConstraint

func ZeroFillColumnConstraint(args Args) Expression

type GenerateOptions

type GenerateOptions struct {
	// Dialect selects the output dialect; see DialectType (nil | string | *dialects.Dialect).
	Dialect            DialectType
	Pretty             bool
	Identify           any
	Normalize          bool
	NormalizeFunctions any
	LeadingComma       bool
	MaxTextWidth       int
	Comments           *bool
}

type IdentifierName

type IdentifierName = any

IdentifierName is a polymorphic identifier-name argument — a table/schema/catalog name part — mirroring the input upstream sqlglot's exp.to_identifier accepts. A value is one of:

  • nil — absent
  • string — a bare name, folded/quoted per the dialect
  • Expression — an already-built Identifier node, used as-is

It is a type alias for any, so it is fully interchangeable with any: adding it to a signature never breaks an existing caller.

type JoinOptions

type JoinOptions struct {
	// On is ANDed into the join's ON condition.
	On []Expression
	// Using lists the join's USING columns.
	Using []Expression
	// Replace resets the existing joins instead of appending (upstream append=False).
	Replace bool
	// JoinType alters the join type: any of the method/side/kind words of a join, e.g.
	// "LEFT", "CROSS", "LEFT OUTER", "NATURAL".
	JoinType string
	// JoinAlias is an optional table alias for the joined source.
	JoinAlias string
	// Copy builds on a copy of the select instead of modifying it in place.
	Copy bool
}

JoinOptions carries Select.join's keyword arguments (expressions/query.py:1365-1445).

type Kind

type Kind int
const (
	KindExpression Kind = iota
	KindColumn
	KindLiteral
	KindIdentifier
	KindStar
	KindAlias
	KindAliases
	KindDot
	KindNull
	KindBoolean
	KindVar
	KindParen
	KindNeg
	KindNot
	KindAdd
	KindSub
	KindMul
	KindDiv
	KindMod
	KindEQ
	KindNEQ
	KindNullSafeEQ
	KindGT
	KindGTE
	KindLT
	KindLTE
	KindAnd
	KindOr
	KindBitwiseAnd
	KindBitwiseOr
	KindBitwiseXor
	KindDPipe
	KindBetween
	KindIs
	KindLike
	KindILike
	// KindSimilarTo/KindEscape port exp.SimilarTo/exp.Escape (expressions/core.py:2226,2162):
	// Postgres `x SIMILAR TO y [ESCAPE z]`, a Binary/Predicate pair like Like/ILike above.
	KindSimilarTo
	KindEscape
	KindIn
	KindSelect
	KindFrom
	KindJoin
	KindTable
	KindTableAlias
	KindWhere
	KindGroup
	KindOrder
	KindLimit
	KindOffset
	KindHint
	KindBlock
	KindPlaceholder
	KindTuple
	KindWith
	KindCTE
	KindRecursiveWithSearch
	KindUnion
	KindExcept
	KindIntersect
	KindSubquery
	KindHaving
	KindHavingMax
	KindQualify
	// KindConnect/KindPrior (query.py:526-531): START WITH ... CONNECT BY hierarchical
	// query clause and its PRIOR operand marker.
	KindConnect
	KindPrior
	KindCube
	KindRollup
	KindGroupingSets
	KindOrdered
	KindDistinct
	KindWindow
	KindWindowSpec
	KindFilter
	KindLimitOptions
	KindFetch
	KindCase
	KindIf
	KindExists
	KindAny
	KindAll
	KindNullSafeNEQ
	KindAnonymous
	KindAbs
	KindAvg
	KindSum
	KindSqrt
	KindLn
	KindExp
	KindMin
	KindMax
	KindRound
	KindLog
	KindPow
	KindStddev
	KindStddevPop
	KindStddevSamp
	KindVariance
	KindVariancePop
	KindDay
	KindMonth
	KindYear
	KindQuarter
	KindApproxDistinct
	KindHll
	KindCountIf
	KindQuantile
	KindCount
	KindCoalesce
	KindGreatest
	KindLeast
	KindInsert
	KindUpdate
	KindDelete
	KindMerge
	KindWhen
	KindWhens
	KindOnConflict
	KindReturning
	KindInto
	KindCreate
	KindSchema
	KindCommand
	KindPivot
	KindLateral
	KindValues
	KindColumnDef
	KindDataType
	KindDataTypeParam
	KindCast
	KindTryCast
	KindCastToStrType
	KindExtract
	KindStrPosition
	KindSubstring
	KindTrim
	KindCeil
	KindFloor
	KindGroupConcat
	KindUnnest
	KindArray
	KindArrayAppend
	KindArrayConstructCompact
	KindArrayIntersect
	KindArrayPrepend
	KindAttach
	KindAttachOption
	KindDateBin
	KindDatetimeDiff
	KindIntDiv
	KindJSONExtractArray
	KindJSONValueArray
	KindMakeInterval
	KindUnixSeconds
	KindInstall
	KindPercentileCont
	KindPositionalColumn
	KindSortArray
	KindRegexpFullMatch
	KindSummarize
	KindUnpivotColumns
	KindToVariant
	KindLogicalAnd
	KindDatetimeAdd
	KindDatetimeSub
	KindTimeAdd
	KindTimeSub
	KindArrayPosition
	KindDotProduct
	KindManhattanDistance
	KindMD5NumberLower64
	KindMD5NumberUpper64
	KindSkewness
	KindStrtokToArray
	KindStuff
	KindToArray
	KindBooland
	KindBoolnot
	KindBoolor
	KindYearOfWeek
	KindToBinary
	KindToBoolean
	KindToDouble
	KindToFile
	KindTimeSlice
	KindBitmapConstructAgg
	KindBitmapCount
	KindCollation
	KindCompress
	KindCorr
	KindCurrentTimezone
	KindElt
	KindFactorial
	KindGrouping
	KindJSONArrayAppend
	KindJSONArrayInsert
	KindJSONRemove
	KindJSONSet
	KindJSONType
	KindMinute
	KindMonthsBetween
	KindNanvl
	KindNegative
	KindNextDay
	KindPad
	KindRandn
	KindRandstr
	KindRegexpCount
	KindRegexpInstr
	KindRegexpSubstr
	KindRegrIntercept
	KindRegrR2
	KindRegrSlope
	KindReverse
	KindRint
	KindSearch
	KindSec
	KindSecond
	KindSecret
	KindShuffle
	KindUtcDate
	KindUtcTime
	KindWidthBucket
	KindAcos
	KindAcosh
	KindArrayConcatAgg
	KindArrayLast
	KindAscii
	KindAsin
	KindAsinh
	KindAtan
	KindAtanh
	KindBitLength
	KindCos
	KindCosh
	KindCot
	KindCovarPop
	KindCovarSamp
	KindCumeDist
	KindDateToDateStr
	KindDateToDi
	KindDayname
	KindDegrees
	KindDenseRank
	KindDiToDate
	KindFromBase32
	KindGenerateTimestampArray
	KindHour
	KindIsInf
	KindJustifyDays
	KindJustifyHours
	KindJustifyInterval
	KindKurtosis
	KindMonthname
	KindNthValue
	KindNtile
	KindPercentRank
	KindPi
	KindRadians
	KindRank
	KindSign
	KindSin
	KindSinh
	KindSpace
	KindTan
	KindTanh
	KindTimeToTimeStr
	KindTimestampLtzFromParts
	KindTimestampTzFromParts
	KindToBase32
	KindTsOrDiToDi
	KindTsOrDsToDateStr
	KindUnixMicros
	KindUnixMillis
	KindUnixToTimeStr
	KindWeek
	KindYearOfWeekIso
	KindBracket
	KindLock
	KindPreWhere
	KindCluster
	KindDistribute
	KindSort
	KindWithinGroup
	KindIgnoreNulls
	KindRespectNulls
	KindPivotAny
	KindPivotAlias
	KindInterval
	KindIntervalSpan
	KindJSONExtract
	KindJSONExtractScalar
	KindJSONBExtract
	KindJSONBExtractScalar
	KindJSONCast
	// KindJSONTable/KindJSONColumnDef/KindJSONSchema/KindFormatJson port the JSON_TABLE
	// family from expressions/query.py:2022,2030,2041 (JSONTable itself lives in
	// expressions/json.py:206).
	KindJSONTable
	KindJSONColumnDef
	KindJSONSchema
	KindFormatJson
	KindArrayAgg
	KindArraySize
	// KindArrayAll and KindArrayAny port exp.ArrayAll / exp.ArrayAny (expressions/array.py:105-110):
	// ARRAY_ALL(arr, lambda) / ARRAY_ANY(arr, lambda), which unnest_subqueries builds.
	KindArrayAll
	KindArrayAny
	KindArrayContains
	KindInitcap
	KindSplit
	KindRegexpLike
	KindRegexpSplit
	KindStructExtract
	KindStandardHash
	KindHex
	KindMD5
	KindStPoint
	KindStDistance
	KindGenerateSeries
	KindDate
	KindAddMonths
	KindDateAdd
	KindDateDiff
	KindJoinHint
	KindTableColumn
	KindFinal
	// The 20 Kinds below close the statement-level parse gaps (SET/SHOW/USE/DESCRIBE/
	// EXPLAIN/BEGIN/COMMIT/ROLLBACK/KILL/LOAD DATA/ANALYZE/GRANT/REVOKE/COMMENT ON/
	// TRUNCATE, plus PRAGMA): ddl.py:104,121,157,173,181,191,306,385,389,393,426;
	// query.py:589,609,619,1879; properties.py:16,20; dml.py:281. KindSavepoint (below,
	// after KindRollback) is the port's own transaction-control extension (no upstream node).
	// All are plain Expression subclasses (no Func/Condition/... mixins), so none get traitsOf rows.
	KindSet
	KindSetItem
	KindShow
	KindUse
	KindKill
	KindUndrop
	KindDescribe
	KindLoadData
	KindTransaction
	KindCommit
	KindRollback
	// KindSavepoint models `SAVEPOINT name` / `RELEASE [SAVEPOINT] name` transaction-control
	// statements. Upstream has no such node (it mis-parses SAVEPOINT as an Alias and parse-errors
	// RELEASE SAVEPOINT); see DEVIATIONS.
	KindSavepoint
	// KindReset models Postgres `RESET { name | ALL }` (reset a run-time parameter to its default).
	// Upstream tokenizes RESET as a raw Command; see DEVIATIONS.
	KindReset
	KindGrant
	KindRevoke
	KindGrantPrivilege
	KindGrantPrincipal
	KindComment
	KindTruncateTable
	KindPartition
	KindAnalyze
	KindPragma
	// Supporting expression/property nodes ported alongside the statement families to
	// close their remaining round-trip gaps: Parameter (mysql `@var` user variables,
	// core.py:1833), RawString (postgres `$$...$$` / raw string literals, query.py:490),
	// and FileFormatProperty (the `FORMAT=<fmt>` option on DESCRIBE, properties.py:176).
	KindParameter
	KindRawString
	KindFileFormatProperty
	// KindEncodeProperty/KindIncludeProperty port exp.EncodeProperty/exp.IncludeProperty
	// (properties.py:586-591): RisingWave's `ENCODE|KEY ENCODE <fmt> (...)` and
	// `INCLUDE <name> [coldef] [AS alias]` CREATE SOURCE/SINK options
	// (parsers/risingwave.py:44-66). Both are plain Property subclasses (no
	// Func/Condition/... mixin), so neither gets a traitsOf row below.
	KindEncodeProperty
	KindIncludeProperty
	// The DDL constraint/alter/drop node family below closes the CREATE-table constraint,
	// ALTER TABLE/VIEW/INDEX, and DROP round-trip gaps: expressions/constraints.py (column
	// constraints, PRIMARY KEY, FOREIGN KEY, indexes) and expressions/ddl.py (ALTER/DROP
	// statements), plus ColumnPosition/AddPartition/DropPartition from expressions/query.py
	// (:498,1941,1949). ColumnConstraintKind (core.py:1605) is itself a plain-Expression
	// marker mixin, so none of these get traitsOf rows.
	KindColumnConstraint
	KindConstraint
	KindPrimaryKey
	KindPrimaryKeyColumnConstraint
	KindForeignKey
	KindReference
	KindNotNullColumnConstraint
	KindUniqueColumnConstraint
	KindCheckColumnConstraint
	KindDefaultColumnConstraint
	KindCollateColumnConstraint
	KindCommentColumnConstraint
	KindCharacterSetColumnConstraint
	KindAutoIncrementColumnConstraint
	KindOnUpdateColumnConstraint
	KindGeneratedAsIdentityColumnConstraint
	KindGeneratedAsRowColumnConstraint
	KindComputedColumnConstraint
	KindCaseSpecificColumnConstraint
	// KindWatermarkColumnConstraint ports exp.WatermarkColumnConstraint (constraints.py:
	// 181-182, arg_types={"this": True, "expression": True}): RisingWave's `WATERMARK FOR
	// <col> AS <expr>` column option (parsers/risingwave.py CONSTRAINT_PARSERS). It is a
	// plain Expression (no ColumnConstraintKind/Func/... mixin), so it gets no traitsOf row.
	KindWatermarkColumnConstraint
	KindNotForReplicationColumnConstraint
	KindZeroFillColumnConstraint
	KindInvisibleColumnConstraint
	KindIndexColumnConstraint
	KindIndexConstraintOption
	KindIndexParameters
	KindColumnPrefix
	KindColumnPosition
	KindAlter
	KindDrop
	KindAlterColumn
	KindModifyColumn
	KindAlterIndex
	KindRenameColumn
	KindRenameIndex
	KindAlterRename
	KindAlterSet
	KindDropPrimaryKey
	KindAddConstraint
	KindDropPartition
	KindAddPartition
	// KindLambda ports exp.Lambda (query.py:646): a plain Expression (no Func/Condition
	// mixin, mirroring e.g. KindTableAlias), so it gets no traitsOf row below.
	KindLambda
	// KindReplace ports exp.Replace (string.py:113), a Func/Condition subclass with no
	// dedicated generator method upstream: base has no replace_sql, so functionFallbackSQL
	// renders it (mirroring e.g. KindInitcap).
	KindReplace
	// KindLogicalOr ports exp.LogicalOr (aggregate.py:171-172): LOGICAL_OR/BOOL_OR/
	// BOOLOR_AGG all parse to it; postgres/mysql rename it on generation (see
	// generator/aggregate.go logicalOrSQL).
	KindLogicalOr
	// KindTableSample ports exp.TableSample (query.py:1723-1733): the `TABLESAMPLE (...)`
	// modifier attached to a table source's "sample" arg (already-wired KindTable arg key,
	// tableSQL/subquerySQL). A plain Expression (no Func/Condition mixin), so it gets no
	// traitsOf row below.
	KindTableSample
	// KindAtTimeZone/KindPseudoType/KindObjectIdentifier close the TYPE/CAST/`::`/
	// AT TIME ZONE round-trip parity gap: exp.AtTimeZone (core.py:2267, a plain
	// Expression - `x AT TIME ZONE zone`, parsed by _parse_at_time_zone), and
	// exp.PseudoType/exp.ObjectIdentifier (datatypes.py:439,443 - both DataType
	// subclasses with arg_types={"this": True}, but "this" holds the raw uppercased
	// token text rather than a DType, so they get their own Kinds/dispatch rather than
	// reusing KindDataType). None of the three have a Condition/Predicate/... mixin
	// upstream, so none get a traitsOf row below.
	KindAtTimeZone
	KindPseudoType
	KindObjectIdentifier
	// KindStruct is exp.Struct (array.py:355, `class Struct(Expression, Func)`,
	// is_var_len_args=True): the constructor produced by _parse_types' inline
	// values-suffix, e.g. STRUCT<a INT, b STRING>(1, 'foo') -> CAST(STRUCT(1, 'foo')
	// AS STRUCT<a INT, b TEXT>). Renders through the generic TraitFunc fallback
	// (STRUCT(...)), matching upstream struct_sql for non-named-field constructors.
	KindStruct
	// KindList ports exp.List (array.py:35-37, `class List(Expression, Func)`,
	// arg_types={"expressions": False}, is_var_len_args=True): the LIST constructor
	// produced by the ARRAY_CONSTRUCTORS bracket swap (`LIST[1, 2, 3]`) and by a
	// `LIST(...)` call (base FUNCTIONS registers every Func subclass by sql_name,
	// expressions/__init__.py:50). Base renders it through the TraitFunc fallback
	// (LIST(1, 2, 3)); materialize overrides to the bracket form.
	KindList
	// KindToMap ports exp.ToMap (array.py:340-341, `class ToMap(Expression, Func)` with
	// default arg_types {"this": True}): materialize's `MAP[...]` / `MAP(...)` constructor
	// (parsers/materialize.py `_parse_map`).
	KindToMap
	// KindCache/KindUncache port exp.Cache/exp.Uncache (core.py:1583-1594): Spark's
	// `CACHE [LAZY] TABLE x [OPTIONS(k = v)] [AS <query>]` / `UNCACHE TABLE [IF EXISTS] x`.
	// Both are plain Expression subclasses (no Func/Condition/... mixin), so neither
	// gets a traitsOf row below.
	KindCache
	KindUncache
	// KindCopy/KindCopyParameter/KindCredentials port exp.Copy/exp.CopyParameter/
	// exp.Credentials (dml.py:166-174, 162-163, 177-184): the `COPY ... FROM/TO ...`
	// statement (parser.py:9616-9649, generator.py:5393-5419). Copy(Expression, DML) gets
	// a traitsOf row (TraitDML); CopyParameter and Credentials are plain Expression
	// subclasses with no mixin, so they get none (mirroring e.g. KindTableAlias).
	KindCopy
	KindCopyParameter
	// Unload is the Athena `UNLOAD (query) TO 's3://…' WITH (…)` export (grammar extension
	// athena-unload); Copy's shape without Copy's COPY rendering.
	KindUnload
	KindCredentials
	// KindJSONObject/KindJSONObjectAgg/KindJSONKeyValue/KindOnCondition/KindJSONValue port
	// the JSON_OBJECT/JSON_OBJECTAGG/JSON_VALUE function family: exp.JSONObject/
	// exp.JSONObjectAgg (expressions/json.py:160-177, both Func subclasses - JSONObjectAgg is
	// also an AggFunc), exp.JSONKeyValue/exp.OnCondition/exp.JSONValue (expressions/query.py:
	// 2026,577,2045 - all three are plain Expression subclasses with no Func/Condition mixin,
	// so none of them get a traitsOf row below; JSONObject/JSONObjectAgg do).
	KindJSONObject
	KindJSONObjectAgg
	KindJSONKeyValue
	KindOnCondition
	KindJSONValue
	// KindChr ports exp.Chr (string.py:23-26, `class Chr(Expression, Func)`,
	// arg_types={"expressions": True, "charset": False}, is_var_len_args=True,
	// _sql_names=["CHR", "CHAR"]): CHR(...)/CHAR(...) with an optional trailing
	// `USING <charset>` clause. Parsed via functionParsers (parseChar), not
	// FromArgList, since the trailing USING clause needs special grammar.
	KindChr
	// The six Kinds below port the STR_TO_*/TIME_STR_TO_* temporal family (expressions/
	// temporal.py:452-473): all are `class X(Expression, Func)`, so each gets a
	// TraitCondition|TraitFunc row below (none is a bare `pass` Expression). TimeStrToDate
	// and TimeStrToUnix are themselves `pass` bodies (temporal.py:464,472), i.e. they inherit
	// arg_types={"this": True} from Expression (core.py:85) rather than declaring their own
	// dict, unlike their four siblings.
	KindStrToDate
	KindStrToTime
	KindStrToUnix
	KindTimeStrToDate
	KindTimeStrToTime
	KindTimeStrToUnix
	// KindXMLElement/KindXMLTable port exp.XMLElement/exp.XMLTable (Expression, Func)
	// (functions.py:439,453). KindXMLNamespace ports exp.XMLNamespace (query.py:2081-2082),
	// a plain Expression (no Func/Condition mixin), so it gets no traitsOf row below
	// (mirroring e.g. KindTableAlias/KindLambda).
	KindXMLElement
	KindXMLTable
	KindXMLNamespace
	// KindPathColumnConstraint ports exp.PathColumnConstraint (constraints.py:185,
	// `class PathColumnConstraint(Expression, ColumnConstraintKind): pass`), the `PATH '<p>'`
	// column constraint XMLTABLE's COLUMNS clause uses. Like upstream (parser.py:1391), "PATH"
	// is registered in the single shared constraintParsers map (parser/parser_constraints.go),
	// so it is reached generically through parseColumnConstraint's loop and composes with any
	// following constraints. Like ColumnConstraintKind's other `pass` subclasses (e.g.
	// KindCollateColumnConstraint), it has no Func/Condition mixin, so it gets no traitsOf
	// row below.
	KindPathColumnConstraint
	// The affix/connector-operator cluster below closes the COLLATE / unary bitwise-not /
	// PIPE_SLASH-CBRT / bitwise-shift / mysql XOR parity gaps, ported from _parse_term,
	// UNARY_PARSERS, _parse_bitwise, and CONJUNCTION/DISJUNCTION (parser.py:908-913,
	// 1113-1120, 6064-6117; parsers/mysql.py:72-81): exp.Collate (functions.py:171,
	// `class Collate(Expression, Binary, Func): pass`), exp.BitwiseNot (core.py:2242,
	// `class BitwiseNot(Unary): pass`), exp.Cbrt (math.py:130, `class Cbrt(Expression,
	// Func): pass`), exp.BitwiseLeftShift/exp.BitwiseRightShift (core.py:2102-2112, both
	// `class ...(Expression, Binary)` with an extra "requires_int128" arg unused by the
	// base parser), and exp.Xor (core.py:2312, `class Xor(Expression, Connector, Func)`
	// with an extra "round_input" arg, likewise unset by the base/mysql parser).
	KindCollate
	KindBitwiseNot
	KindCbrt
	KindBitwiseLeftShift
	KindBitwiseRightShift
	KindXor
	// FROM-clause / DML tail cluster: exp.Directory (dml.py:187, Hive/Spark `INSERT
	// OVERWRITE [LOCAL] DIRECTORY '...'`), exp.RowFormatDelimitedProperty/
	// RowFormatSerdeProperty/SerdeProperties (properties.py:405,418,452, the Hive `ROW
	// FORMAT ...` clause used by Directory), and exp.WithTableHint/IndexTableHint
	// (query.py:923,927 - T-SQL `WITH (...)` / MySQL `USE|FORCE|IGNORE INDEX` table
	// hints, parsed by _parse_table_hints and threaded through Table's existing "hints"
	// arg). None of these have a Condition/Predicate/... mixin upstream, so none get a
	// traitsOf row below.
	KindDirectory
	KindRowFormatDelimitedProperty
	KindRowFormatSerdeProperty
	KindSerdeProperties
	KindWithTableHint
	KindIndexTableHint

	// ddl cluster: CREATE FUNCTION/PROCEDURE/INDEX/TRIGGER structured parsing, plus the
	// small PROPERTY_PARSERS subset (parser.py:1227-1341) needed to close the DDL-tail
	// parity gaps (RETURNS/LANGUAGE/SQL SECURITY/CALLED ON NULL INPUT/STRICT/IMMUTABLE-
	// STABLE-DETERMINISTIC/SET .../CHARACTER SET/CHARSET/ROW_FORMAT). None of these carry a
	// Condition/Func/... mixin upstream (all `class X(Expression)` or `class X(Property)`,
	// and Property itself is a plain Expression subclass), so none get a traitsOf row below -
	// mirroring the existing KindTableAlias/KindLambda pattern.
	//
	// KindProperties/KindUserDefinedFunction (ddl.py / properties.py): the generic property
	// list container, and the UDF signature node (`name(args...)`).
	KindProperties
	KindUserDefinedFunction
	// KindReturnsProperty/KindLanguageProperty/KindSqlSecurityProperty/
	// KindCalledOnNullInputProperty/KindStrictProperty/KindStabilityProperty/
	// KindSetConfigProperty/KindCharacterSetProperty/KindRowFormatProperty (properties.py:
	// 74,222,393,397,401,456ish,464,480) - the small set of CREATE FUNCTION/TABLE tail
	// properties this slice supports; the other ~90 PROPERTY_PARSERS entries are exotic
	// dialect-specific storage/model properties out of scope (documented divergence,
	// mirroring constraintParsers' analogous omission list in parser_constraints.go).
	KindReturnsProperty
	KindLanguageProperty
	KindSqlSecurityProperty
	KindCalledOnNullInputProperty
	KindStrictProperty
	KindStabilityProperty
	KindSetConfigProperty
	KindCharacterSetProperty
	KindRowFormatProperty
	// KindReturn ports exp.Return (query.py:882, `pass` - default {"this": True}): the
	// `RETURN <expr>` wrapper _parse_create can apply to a UDF/procedure body
	// (parser.py:2469-2470).
	KindReturn
	// KindIndex/KindOpclass port exp.Index (query.py:558-566) and exp.Opclass (core.py:1817-
	// 1818, `col opclass_name` inside an index column list, e.g. `USING gin(title
	// public.gin_trgm_ops)`). KindIndexParameters (already ported) is Index's "params" arg.
	KindIndex
	KindOpclass
	// KindTriggerProperties/KindTriggerExecute/KindTriggerEvent/KindTriggerReferencing port
	// exp.TriggerProperties/TriggerExecute/TriggerEvent/TriggerReferencing (ddl.py:76-101):
	// CREATE TRIGGER's structured body (timing/events/ON table/FROM/DEFERRABLE/REFERENCING/
	// FOR EACH .../WHEN/EXECUTE FUNCTION|PROCEDURE).
	KindTriggerProperties
	KindTriggerExecute
	KindTriggerEvent
	KindTriggerReferencing

	// dialect-funcs cluster: canonical Kinds closing the mysql CURTIME/CURDATE/
	// DAY_OF_MONTH/DAY_OF_WEEK/DAY_OF_YEAR/WEEK_OF_YEAR/LCASE/UCASE/DATABASE/TRUNC
	// spelling gaps and the postgres CHAR_LENGTH/CHARACTER_LENGTH/OVERLAY/VARIADIC gaps:
	// exp.CurrentDate/CurrentTime (temporal.py:25,33), exp.DayOfMonth/DayOfWeek/DayOfYear/
	// WeekOfYear (temporal.py:209,213,221,269), exp.CurrentSchema (functions.py:285),
	// exp.Lower/Upper (string.py:85,254), exp.Length (string.py:69), exp.TimeStrToUnix
	// (temporal.py:472), exp.Trunc (math.py:188), exp.Overlay (string.py:101), and
	// exp.Variadic (query.py:2099 - a plain `pass` Expression, no Func/Condition mixin,
	// so it gets no traitsOf row below, mirroring KindLambda/KindTableAlias).
	KindCurrentDate
	KindCurrentDatetime
	KindCurrentTime
	KindCurrentSchema
	KindDayOfMonth
	KindDayOfWeek
	KindDayOfYear
	KindWeekOfYear
	KindLower
	KindUpper
	KindLength
	KindTrunc
	KindOverlay
	KindVariadic
	// slice-strings cluster: KindSlice is exp.Slice (expressions/core.py:2017-2018, a plain
	// Expression) - the `start:end:step` triple inside a bracket subscript, e.g. x[1:2].
	// KindNational is exp.National (expressions/query.py:585-586, is_primitive=True) - a
	// national-character string literal, e.g. N'abc'.
	KindSlice
	KindNational

	// range-ops cluster: binary/range operators owned by parseRange/parseIs/
	// columnOperators (parser.go). Mirrors core.py/array.py/json.py/string.py/query.py
	// Binary subclasses used by RANGE_PARSERS + COLUMN_OPERATORS[PLACEHOLDER].
	//
	// KindGlob (core.py:2166, `class Glob(Expression, Binary, Predicate)`).
	KindGlob
	// KindMatch (core.py:2170, `class Match(Expression, Binary, Predicate)`): sqlite's
	// `x MATCH y` range operator (parsers/sqlite.py:94-98).
	KindMatch
	// KindOverlaps (core.py:2122, `class Overlaps(Expression, Binary)`).
	KindOverlaps
	// KindRegexpILike (string.py:448, `class RegexpILike(Expression, Binary, Func)`):
	// the `~*` postgres operator / IRLIKE token. KindRegexpLike (RLIKE token / `~`)
	// already exists above (function-registry cluster) and is reused as-is.
	KindRegexpILike
	// KindAdjacent (core.py:2234, `class Adjacent(Expression, Binary)`): postgres
	// range `-|-` operator.
	KindAdjacent
	// KindExtendsLeft/KindExtendsRight (core.py:2126,2130): postgres range `&<` / `&>`.
	KindExtendsLeft
	KindExtendsRight
	// KindArrayContainsAll/KindArrayContainedBy/KindArrayOverlaps (array.py:113,117,131,
	// all `Expression, Binary, Func`): postgres `@>`/`<@`/`&&` array operators.
	KindArrayContainsAll
	KindArrayContainedBy
	KindArrayOverlaps
	// KindJSONBContains/KindJSONBContainsAllTopKeys/KindJSONBContainsAnyTopKeys/
	// KindJSONBDeleteAtPath/KindJSONBPathExists (json.py:49,53,57,61,65, all
	// `Expression, Binary, Func` except JSONBPathExists which also mixes in
	// Predicate): postgres `?`/`?&`/`?|`/`#-`/`@?` jsonb operators.
	KindJSONBContains
	KindJSONBContainsAllTopKeys
	KindJSONBContainsAnyTopKeys
	KindJSONBDeleteAtPath
	KindJSONBPathExists
	// KindJSON (query.py:1965, `class JSON(Expression)`, no Condition/Func mixin):
	// the `x IS JSON [VALUE|SCALAR|ARRAY|OBJECT] [WITH|WITHOUT] [UNIQUE KEYS]`
	// predicate kind, built by parseIs and rendered by json_sql.
	KindJSON
	// KindOperator (core.py:2222, `class Operator(Expression, Binary)`): postgres
	// `x OPERATOR(schema.op) y` explicit-operator syntax (_parse_operator).
	KindOperator
	// KindMatchAgainst (string.py:89, `class MatchAgainst(Expression, Func)`, no
	// Binary mixin): mysql `MATCH(...) AGAINST(...)` full-text search, reused here
	// as the target of postgres' `x @@ y` operator (parsers/postgres.py RANGE_PARSERS
	// TokenType.DAT builds MatchAgainst(this=rhs, expressions=[lhs]), NOT a dedicated
	// JSONB-path-match node - v30.12.0 has no exp.JSONBPathMatch).
	KindMatchAgainst
	// KindJSONArrayContains (json.py:38, `class JSONArrayContains(Expression, Binary,
	// Predicate, Func)`): mysql `x MEMBER OF(y)`, built by parsers/mysql.py's
	// RANGE_PARSERS[MEMBER_OF] (there is no dedicated exp.MemberOf class upstream).
	KindJSONArrayContains
	// KindSoundex (string.py:144, `class Soundex(Expression, Func)`): mysql
	// `x SOUNDS LIKE y` desugars to EQ(Soundex(x), Soundex(y)) in
	// parsers/mysql.py's RANGE_PARSERS[SOUNDS_LIKE] (there is no dedicated
	// exp.SoundsLike class upstream).
	KindSoundex

	// residual-tail cluster: byte/hex/bit-string literals, session parameters, the `:=`
	// assignment operator, and the postgres distance operators.
	//
	// KindBitString/KindHexString/KindByteString (query.py:471-491, all `Expression,
	// Condition` with `is_primitive = True`): BIT_STRING/HEX_STRING/BYTE_STRING token
	// literals (`b'101'`/`0b101`, `x'FF'`/`0xFF`, postgres `e'...'`). KindRawString
	// already exists (slice-strings cluster) and covers HEREDOC_STRING/RAW_STRING.
	KindBitString
	KindHexString
	KindByteString
	// KindSessionParameter (core.py:1837, `class SessionParameter(Expression, Condition)`):
	// mysql `@@GLOBAL.max_connections` / bare `@@x` session-variable reference.
	KindSessionParameter
	// KindPropertyEQ (core.py:2150, `class PropertyEQ(Expression, Binary)`): the ASSIGNMENT
	// `:=` operator (parser.py:881-883), e.g. mysql `SELECT @var1 := 1`.
	KindPropertyEQ
	// KindKwarg ports exp.Kwarg (core.py:1920-1922, `class Kwarg(Expression, Binary)`):
	// named-argument `k => v` inside a call (base LAMBDAS FARROW entry, parser.py:995-999).
	KindKwarg
	// KindDistance/KindDistanceNd (core.py:2154/2158, both `class X(Expression, Binary)`):
	// the FACTOR-level postgres `<->`/`<<->>` distance operators (parser.py:917-918).
	KindDistance
	KindDistanceNd
	// KindLag/KindLead (aggregate.py:150-163, both `class X(Expression, AggFunc)`): the
	// LAG/LEAD window functions. Previously unregistered (fell through to Anonymous), which
	// meant a parenthesized call like `(LEAD(x)) OVER (...)` never tripped parseParen's
	// `this.This().Is(exp.TraitAggFunc)` window-reparse gate (Anonymous has no AggFunc
	// trait) - registering them here is what actually closes that gap, not a parser change.
	KindLag
	KindLead
	// KindConcat (string.py:29-31, `class Concat(Expression, Func)`, is_var_len_args=True):
	// built by both _parse_primary's adjacent-string-literal rewrite (`'a' 'b'` -> Concat,
	// parser.py:6871-6885) and the CONCAT(...) function builder (parser.py:345-349, ported as
	// parser.parseConcat - dialect-aware, since safe/coalesce depend on the dialect). CONCAT_WS
	// stays Anonymous: it needs a separate exp.ConcatWs node, out of scope here.
	KindConcat

	// fidelity-properties/constraints/query cluster: CREATE/ALTER properties, column
	// constraints, partition bounds, and ANALYZE options needed by the DDL fidelity slice.
	// Upstream defines these as plain Expression, Property, or ColumnConstraintKind subclasses
	// (properties.py:12-553, constraints.py:76-198, query.py:589-594,1879-1938), so none
	// receive traitsOf, primitive, or varLenArgs rows below.
	KindProperty
	KindAlgorithmProperty
	KindAutoIncrementProperty
	KindCollateProperty
	KindDefinerProperty
	KindEngineProperty
	KindInheritsProperty
	KindLikeProperty
	// KindModuleProperty (properties.py:61, `class ModuleProperty(Property)`): sqlite
	// `CREATE VIRTUAL TABLE ... USING <module>([cols])`.
	KindModuleProperty
	// KindVirtualProperty (properties.py:65, `class VirtualProperty(Property)`): sqlite
	// `CREATE VIRTUAL TABLE`.
	KindVirtualProperty
	KindLockProperty
	KindLockingProperty
	KindMaterializedProperty
	KindNoPrimaryIndexProperty
	KindOnCommitProperty
	KindOnProperty
	// Teradata CREATE TABLE property nodes (properties.py: the SetProperty .. WithJournalTable
	// cluster), built by the PROPERTY_PARSERS entries _parse_property_before dispatches to
	// (parser.py:2855-2881 + 3171-3240). SetProperty's `multi` arg and LogProperty's /
	// FallbackProperty's / JournalProperty's / IsolatedLoadingProperty's / WithJournalTable's
	// required args are marked required exactly like upstream arg_types; JournalProperty's
	// `local` holds the "LOCAL"/"NOT LOCAL" string (parser.py:2864-2865).
	KindSetProperty
	KindFallbackProperty
	KindJournalProperty
	KindChecksumProperty
	KindFreespaceProperty
	KindDataBlocksizeProperty
	KindBlockCompressionProperty
	KindMergeBlockRatioProperty
	KindGlobalProperty
	KindLogProperty
	KindIsolatedLoadingProperty
	KindWithJournalTableProperty
	KindPartitionedByProperty
	KindPartitionByRangeProperty
	KindPartitionByListProperty
	KindPartitionList
	KindPartitionBoundSpec
	KindPartitionedOfProperty
	KindSchemaCommentProperty
	KindSqlReadWriteProperty
	KindTemporaryProperty
	KindUnloggedProperty
	KindWithDataProperty
	KindPartitionRange
	KindAnalyzeHistogram
	KindAnalyzeWith
	KindUsingData
	KindCompressColumnConstraint
	KindDateFormatColumnConstraint
	KindExcludeColumnConstraint
	KindInlineLengthColumnConstraint
	KindTitleColumnConstraint
	KindUppercaseColumnConstraint
	KindWithOperator
	KindInOutColumnConstraint
	// presto cluster: Func-trait Kinds referenced by the Presto FUNCTIONS overlay
	// (dialects/presto.go). Appended at the end of the iota block so existing Kind
	// values are not renumbered (values aren't serialized - additive-safe). Each cites
	// its upstream class in the parallel tables below and in expressions/presto_nodes.go.
	KindAnyValue         // aggregate.py:17
	KindApproxQuantile   // aggregate.py:234
	KindApproxQuantiles  // aggregate.py: ApproxQuantiles
	KindArrayUniqueAgg   // aggregate.py:83
	KindDayOfWeekIso     // temporal.py:217
	KindDecode           // string.py:285
	KindEncode           // string.py:289
	KindJSONFormat       // json.py:145
	KindLevenshtein      // string.py:74
	KindMD5Digest        // string.py:540
	KindSHA2             // string.py:562
	KindSHA2Digest       // string.py:582-583
	KindStrToMap         // string.py:203
	KindTimeToUnix       // temporal.py:484
	KindUnixToTime       // temporal.py:532
	KindUnhex            // string.py:405
	KindArraySlice       // array.py:85
	KindCurrentTimestamp // temporal.py:37
	// KindUnicodeString is exp.UnicodeString (query.py:494, `U&'...'`), a primitive
	// Condition (NOT a Func) - it has no functionFallbackSQL path, so the generator
	// supplies a dedicated dispatch method (mirrors KindNational's `N'...'`).
	KindUnicodeString // query.py:494
	// KindVersion is exp.Version (query.py:1111-1123): a table's time-travel clause,
	// `FOR TIMESTAMP|VERSION AS OF x` and friends. A plain Expression, no Func mixin.
	KindVersion // query.py:1111
	// MatchRecognize / MatchRecognizeMeasure (query.py:817-835): the MATCH_RECOGNIZE query
	// modifier and its MEASURES items. Plain Expressions.
	KindMatchRecognize        // query.py:824
	KindMatchRecognizeMeasure // query.py:817
	KindRegexpReplace         // string.py:468
	KindParseJSON             // json.py:239
	// trino cluster: minimal AST surface required by the Trino/Athena parser and
	// generator deltas. These mirror functions.py:249-250,317-318,
	// query.py:1961-1962,2062-2066, core.py:1596-1597, and array.py:146-147.
	KindCurrentCatalog           // functions.py:249-250
	KindCurrentVersion           // functions.py:317-318
	KindJSONExtractQuote         // query.py:2062-2066
	KindOverflowTruncateBehavior // query.py:1961-1962
	KindRefresh                  // core.py:1596-1597
	KindArrayFirst               // array.py:146-147
	// hive cluster: property, transform, map, and function Kinds referenced by the
	// Hive parser and FUNCTIONS overlay. Appended so existing Kind values remain stable.
	KindExternalProperty       // properties.py:168-169
	KindClusteredByProperty    // properties.py:230-231
	KindLocationProperty       // properties.py:262-263
	KindStorageHandlerProperty // properties.py:488-489
	KindUsingProperty          // properties.py:492-494
	KindInputOutputFormat      // query.py:878-879
	KindQueryTransform         // properties.py:422-431
	KindTransform              // array.py:214-215
	KindToBase64               // string.py:325-326
	KindFromBase64             // string.py:301-302
	KindTsOrDsAdd              // temporal.py:145-147
	KindTsOrDsToDate           // temporal.py:492-493
	KindFirst                  // aggregate.py:125-126
	KindFirstValue             // aggregate.py:129-130
	KindLast                   // aggregate.py:155-156
	KindLastValue              // aggregate.py:159-160
	KindRegexpExtract          // string.py:421-430
	KindRegexpExtractAll       // string.py:433-441
	KindTimestampTrunc         // temporal.py:190-191
	KindDateTrunc              // temporal.py:165-166
	KindUnixToStr              // temporal.py:528-529
	KindTimeToStr              // temporal.py:476-477
	KindStarMap                // array.py:331-332
	KindVarMap                 // array.py:339-341
	// Niladic system-value functions completing NO_PAREN_FUNCTIONS (parser.py:431-438 +
	// parsers/base.py:8-13, parsers/postgres.py:145-152, parsers/mysql.py:55-59). CurrentDate/
	// CurrentTime/CurrentTimestamp/CurrentSchema/CurrentCatalog already exist above.
	KindCurrentUser    // functions.py:309-310
	KindCurrentRole    // functions.py:277-278
	KindSessionUser    // functions.py:325-326
	KindLocaltime      // temporal.py:49-50
	KindLocaltimestamp // temporal.py:53-54
	// KindWhileBlock/KindEndStatement port exp.WhileBlock/EndStatement (query.py:2115-2120):
	// the WHILE statement and the trailing END of a BEGIN...END block, both produced by
	// _parse_batch_statements/_parse_whileblock (parser.py:2114-2135, 2278-2281). KindBlock
	// (already ported) is the body container.
	KindWhileBlock
	KindEndStatement
	// KindHeredoc ports exp.Heredoc (ddl.py:177-178): a dollar-quoted UDF/procedure body
	// (postgres `AS $$ ... $$`), built by _parse_heredoc (parser.py:9368-9370).
	KindHeredoc
	// KindSemicolon ports exp.Semicolon (query.py:2089-2090): the carrier for a trailing
	// `;`'s comments — a SEMICOLON token with comments becomes its own statement chunk
	// (parser.py:2159-2161) and parses via STATEMENT_PARSERS (parser.py:1110).
	KindSemicolon
	// MySQL compound-statement grammar (reference manual §15.6; upstream sqlglot does not
	// parse these — grammar extension, DEVIATIONS §1.18). KindIfBlock ports exp.IfBlock
	// (query.py:2111-2112, T-SQL's shape: this=condition, true=Block, false=Block|IfBlock
	// for ELSEIF chains). LoopBlock/RepeatBlock/CaseBlock are original nodes for
	// `LOOP…END LOOP`, `REPEAT…UNTIL…END REPEAT`, and the CASE *statement*
	// (`CASE…WHEN…THEN <stmts>…END CASE`), each with an optional MySQL statement label.
	KindIfBlock
	KindLoopBlock
	KindRepeatBlock
	KindCaseBlock
	// KindCaseStatement/KindLeave/KindIterate port exp.CaseStatement/Leave/Iterate
	// (query.py:2126-2148), the remaining routine statements of Trino's inline SQL UDFs
	// (parsers/trino.py:214-268). CaseStatement carries an optional operand `this`, `ifs`
	// branches built from exp.If, and an optional `default` Block.
	KindCaseStatement
	KindLeave
	KindIterate
	// KindDeclare/KindDeclareItem port exp.Declare/DeclareItem (ddl.py:164-170): MySQL
	// `DECLARE <name> <type> [DEFAULT <expr>]` local variables (also T-SQL upstream).
	KindDeclare
	KindDeclareItem
	// TSQL cluster: nodes the T-SQL dialect parses into. Execute/ExecuteSql
	// (ddl.py:436-444), ScopeResolution/QueryOption/ForClause/XMLKeyValueOption
	// (query.py:914-919,2081-2097), StoredProcedure (query.py:2115), Convert
	// (functions.py:89), and the temporal/string/math function nodes below.
	KindExecute
	KindExecuteSql
	KindScopeResolution
	KindQueryOption
	KindXMLKeyValueOption
	KindForClause
	KindJSONArrayAgg
	KindConvert
	KindTimestampFromParts
	KindDateFromParts
	KindSplitPart
	KindStoredProcedure
	KindLastDay
	KindAtan2
	KindUuid
	KindRepeat
	KindLeft
	KindRight
	KindSHA
	KindSHA1Digest
	KindCurrentTimestampLTZ
	KindDateStrToDate
	KindTimestampAdd
	KindTsOrDsDiff
	KindNumberToStr
	KindIsAscii
	KindVolatileProperty
	// TSQL cluster, cont.: NextValueFor (ddl.py:432) and the CLUSTERED/NONCLUSTERED
	// column constraints (constraints.py:64,139) used by T-SQL's UNIQUE/PK index syntax.
	KindNextValueFor
	// KindNvl2 (functions.py:160, `class Nvl2(Expression, Func)`): NVL2(expr, true, false),
	// which dialects without native NVL2 (dremio) rewrite as a CASE expression.
	KindNvl2
	// KindTranslateCharacters (query.py:1969, `class TranslateCharacters(Expression)`):
	// Teradata TRANSLATE(x USING <charset> [WITH ERROR]).
	KindTranslateCharacters
	// KindRangeN (functions.py:510, `class RangeN(Expression, Func)`): Teradata RANGE_N.
	KindRangeN
	// KindQueryBand (query.py:438, `class QueryBand(Expression)`): Teradata SET QUERY_BAND.
	KindQueryBand
	// KindLockingStatement (core.py:1601, `class LockingStatement(Expression)`): Teradata
	// LOCKING <clause> <select>.
	KindLockingStatement
	// KindFormatPhrase (core.py:2290, `class FormatPhrase(Expression)`): Teradata
	// `col (FORMAT '<fmt>')` output-format override.
	KindFormatPhrase
	// KindPrevValueFor mirrors NextValueFor for MariaDB's `PREVIOUS VALUE FOR <seq>` sequence
	// access (beyond upstream, which has no MariaDB dialect). See DEVIATIONS
	// "Opt-in behavioral extensions".
	KindPrevValueFor
	KindClusteredColumnConstraint
	KindNonClusteredColumnConstraint
	// TSQL cluster, cont.: OPENJSON + its column definitions (json.py:235,
	// query.py:2070), the temporal PERIOD constraint (constraints.py:44) and the
	// SYSTEM_VERSIONING / DATA_DELETION properties (properties.py:544,572).
	KindOpenJSON
	KindOpenJSONColumnDef
	KindPeriodForSystemTimeConstraint
	KindWithSystemVersioningProperty
	KindDataDeletionProperty
	// SequenceProperties ports exp.SequenceProperties (expressions/ddl.py:64): the node
	// _parse_sequence_properties emits between comma-separated key=value options.
	KindSequenceProperties

	// ClickHouse cluster (parsers/clickhouse.py, generators/clickhouse.py): aggregate
	// combinators, array helpers, JSON path parts, and ClickHouse-only DDL nodes.
	KindArrayDistinct
	KindArrayConcat
	KindArrayFilter
	KindArrayRemove
	KindArrayReverse
	KindArraySum
	KindArrayMax
	KindArrayMin
	KindArgMax
	KindArgMin
	KindCityHash64
	KindCurrentDatabase
	KindCurrentSchemas
	KindCosineDistance
	KindDateSub
	KindExplode
	KindExplodeOuter
	KindApproxTopK
	KindAIForecast
	KindAIEmbed
	KindAIGenerate
	KindAISimilarity
	KindByteLength
	KindContains
	KindGapFill
	KindTranslate
	KindDatetime
	KindDatetimeTrunc
	KindTimeDiff
	KindExplodingGenerateSeries
	KindExport
	KindFeaturesAtTime
	KindForIn
	KindGenerateBool
	KindGenerateDouble
	KindGenerateEmbedding
	KindGenerateInt
	KindGenerateTable
	KindGenerateText
	KindInt64
	KindJSONBool
	KindJSONKeysAtDepth
	KindJSONStripNulls
	KindLowerHex
	KindMLForecast
	KindMLTranslate
	KindNetFunc
	KindNormalize
	KindParseTime
	KindPredict
	KindSafeFunc
	KindTime
	KindTimestamp
	KindTimeFromParts
	KindTsOrDsToDatetime
	KindTsOrDsToTime
	KindTsOrDsToTimestamp
	KindUnixDate
	KindVectorSearch
	KindWeekStart
	KindEnviromentProperty
	KindStream
	KindString
	KindFarmFingerprint
	KindIsNan
	KindJarowinklerSimilarity
	KindJSONPath
	KindJSONPathKey
	KindJSONPathRoot
	KindJSONPathSubscript
	KindJSONPathWildcard
	KindJSONPathFilter
	KindJSONPathRecursive
	KindJSONPathScript
	KindJSONPathSelector
	KindJSONPathSlice
	KindJSONPathUnion
	KindMap
	KindMedian
	KindNullif
	KindRand
	KindStartsWith
	KindEndsWith
	KindEuclideanDistance
	KindTimestampSub
	KindTypeof
	KindParseDatetime
	KindDetach
	KindOnCluster
	KindPartitionId
	KindReplacePartition
	KindProjectionDef
	KindNestedJSONSelect
	KindAutoRefreshProperty
	KindUuidProperty
	KindApply
	KindColumns
	KindAssumeColumnConstraint
	KindAlterModifySqlSecurity
	KindCombinedAggFunc
	KindParameterizedAgg
	KindAnonymousAggFunc
	KindCombinedParameterizedAgg
	KindFunctionSpecification
	KindSettingsProperty
	KindMergeTreeTTL
	KindMergeTreeTTLAction
	KindDictProperty
	KindDictSubProperty
	KindDictRange
	KindSampleProperty
	KindArrayCompact
	KindArrayExcept
	KindSubstringIndex
	KindUtcTimestamp
	KindWithFill
	KindSkipJSONColumn
	// StarRocks cluster (parsers/starrocks.py, generators/starrocks.py): primary-key /
	// rollup / refresh properties, dynamic partition ranges, and the ARRAY helpers.
	KindUniqueKeyProperty
	KindRollupProperty
	KindRollupIndex
	KindRefreshTriggerProperty
	KindPartitionByRangePropertyDynamic
	KindClusterProperty
	KindFlatten
	KindArrayToString
	KindDistributedByProperty
	KindGenerateDateArray
	KindRowNumber
	KindBuildProperty
	KindDuplicateKeyProperty
	KindStringToArray
	KindConvertToCharset
	KindToChar
	KindToNumber
	KindSystimestamp
	KindUnicode
	KindJSONArray
	KindJSONExists
	KindForceProperty
	KindMultitableInserts
	KindConditionalInsert
	KindConnectByRoot
	KindFromBase
	KindCurrentUserId
	KindObjectTransform
	KindConvertTimezone
	KindConcatWs
	KindSortKeyProperty
	KindDistKeyProperty
	KindDistStyleProperty
	KindPercentileDisc
	KindAtIndex
	KindAlterDistStyle
	KindAlterSortKey
	// Spark/Databricks cluster (expressions/{array,math,aggregate,json,temporal,
	// functions,string,constraints}.py): nodes the spark2/spark/databricks parsers and
	// generators build.
	KindReduce
	KindFromTimeZone
	KindArrayInsert
	KindBitwiseAndAgg
	KindBitwiseOrAgg
	KindBitwiseXorAgg
	KindBitwiseCount
	KindTimestampDiff
	KindSafeAdd
	KindSafeDivide
	KindSafeMultiply
	KindSafeSubtract
	KindJSONKeys
	KindUniform
	KindTimeseriesKey
	KindRegrAvgx
	KindRegrAvgy
	KindRegrSxx
	KindRegrSxy
	KindRegrSyy
	KindRegrCount
	KindGetbit
	KindDateFromUnixDate
	KindReadParquet
	KindFormat
)

func KindByClassName

func KindByClassName(name string) (Kind, bool)

KindByClassName returns the Kind whose upstream class name is name (e.g. "StddevPop"), and whether one exists.

func KindsWithTrait

func KindsWithTrait(trait Trait) []Kind

KindsWithTrait returns every Kind carrying trait, the port of helper.subclasses(exp, <trait>).

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) AddComments

func (n *Node) AddComments(comments []string, prepend bool)

func (*Node) Alias

func (n *Node) Alias() string

func (*Node) AliasColumnNames

func (n *Node) AliasColumnNames() []string

func (*Node) AliasOrName

func (n *Node) AliasOrName() string

func (*Node) Append

func (n *Node) Append(key string, val Expression)

func (*Node) Arg

func (n *Node) Arg(key string) any

func (*Node) ArgKey

func (n *Node) ArgKey() string

func (*Node) ArgOrder

func (n *Node) ArgOrder() []string

ArgOrder returns the node's arg keys in insertion order, upstream's args dict order.

func (*Node) CatalogName

func (n *Node) CatalogName() string

func (*Node) Comments

func (n *Node) Comments() []string

func (*Node) Copy

func (n *Node) Copy() Expression

func (*Node) Eq

func (n *Node) Eq(other any) Expression

Eq ports Expression.eq (expressions/core.py:1476-1483): `this = other`.

func (*Node) Equal

func (n *Node) Equal(other Expression) bool

func (*Node) ErrorMessages

func (n *Node) ErrorMessages(args []any) []string

func (*Node) Expr

func (n *Node) Expr() Expression

func (*Node) Expressions

func (n *Node) Expressions() []Expression

func (*Node) ExpressionsFor

func (n *Node) ExpressionsFor(key string) []Expression

func (*Node) Find

func (n *Node) Find(t Target) Expression

func (*Node) FindAll

func (n *Node) FindAll(t Target, bfsOpt ...bool) []Expression

func (*Node) FindAncestor

func (n *Node) FindAncestor(kinds ...Kind) Expression

func (*Node) From_

func (n *Node) From_(expression Expression, copyValue bool) Expression

From_ ports Select.from_ (expressions/query.py:1147-1180): it sets the FROM clause, wrapping a source that is not already a From.

func (*Node) GroupBy

func (n *Node) GroupBy(appendValue, copyValue bool, expressions ...Expression) Expression

GroupBy ports Select.group_by (expressions/query.py:1183-1220).

func (*Node) HashKey

func (n *Node) HashKey() uint64

func (*Node) Having

func (n *Node) Having(appendValue, copyValue bool, expressions ...Expression) Expression

Having ports Select.having (expressions/query.py:1461-1500): it ANDs the conditions into the query's HAVING, replacing it when appendValue is false.

func (*Node) Index

func (n *Node) Index() int

func (*Node) Into

func (n *Node) Into() Expression

Into returns the INTO clause of a query (the `into` arg) as an Expression, or nil when absent — a typed read of an arg that would otherwise be fetched and type-asserted by hand.

func (*Node) Is

func (n *Node) Is(trait Trait) bool

func (*Node) IsInt

func (n *Node) IsInt() bool

func (*Node) IsLeaf

func (n *Node) IsLeaf() bool

func (*Node) IsNumber

func (n *Node) IsNumber() bool

func (*Node) IsPrimitive

func (n *Node) IsPrimitive() bool

func (*Node) IsStar

func (n *Node) IsStar() bool

func (*Node) IsString

func (n *Node) IsString() bool

func (*Node) IsType

func (n *Node) IsType(dtypes ...any) bool

IsType ports is_type. On a DataType it is DataType.is_type (expressions/datatypes.py:419-447); on any other expression it checks the annotated type (expressions/core.py:984-986), which a cast's target type does not count as.

func (*Node) Is_

func (n *Node) Is_(other any) Expression

Is_ ports Expression.is_ (expressions/core.py:1467-1474): `this IS other`.

func (*Node) IterExpressions

func (n *Node) IterExpressions(reverse bool) []Expression

IterExpressions ports Expr.iter_expressions: the node's direct child expressions, in arg order (reversed when reverse is true).

func (*Node) Join

func (n *Node) Join(expression Expression, opts JoinOptions) Expression

Join ports Select.join (expressions/query.py:1365-1445) for expression arguments.

func (*Node) Keyword

func (n *Node) Keyword() string

Keyword returns the normalized value of a Command node's `this` — upper-cased, trimmed, with internal whitespace collapsed to single spaces — so it is stable across both Command builder paths (one upper-cases `this`, the other keeps it verbatim) and across multi-word command tokens (MySQL `LOCK TABLES`). For every statement sqlglot-go fails closed on, `this` is the leading keyword of the fallback, which is the statement's leading keyword. It returns "" for a node that is not a Command. Read only this; a Command's untokenized remainder is never a reliable discriminator and must not be parsed by consumers.

func (*Node) Kind

func (n *Node) Kind() Kind

func (*Node) Left

func (n *Node) Left() Expression

func (*Node) Meta

func (n *Node) Meta() map[string]any

Meta returns the node's mutable metadata map, allocating it on first access. Ports upstream Expression.meta (core.py:991). Metadata (e.g. "is_table", "case_sensitive") travels with the node but is never part of its generated SQL or its ToS() repr.

func (*Node) MetaGet

func (n *Node) MetaGet(key string) any

MetaGet reads a metadata value without allocating the map (unlike Meta). Ports upstream Expression.meta_get (core.py:996); returns nil when the key (or the map) is unset.

func (*Node) Name

func (n *Node) Name() string

func (*Node) NamedSelects

func (n *Node) NamedSelects() []string

func (*Node) Not_

func (n *Node) Not_(copyValue bool) Expression

Not_ ports Expression.not_ (expressions/core.py:1356-1366).

func (*Node) OutputName

func (n *Node) OutputName() string

func (*Node) Parent

func (n *Node) Parent() Expression

func (*Node) ParentSelect

func (n *Node) ParentSelect() Expression

func (*Node) Parts

func (n *Node) Parts() []Expression

func (*Node) Pop

func (n *Node) Pop() Expression

func (*Node) PopComments

func (n *Node) PopComments() []string

func (*Node) Replace

func (n *Node) Replace(expression Expression) Expression

func (*Node) Right

func (n *Node) Right() Expression

func (*Node) Root

func (n *Node) Root() Expression

func (*Node) SQL

func (n *Node) SQL(opts GenerateOptions) (string, error)

func (*Node) SameParent

func (n *Node) SameParent() bool

func (*Node) SchemaName

func (n *Node) SchemaName() string

func (*Node) SelectExprs

func (n *Node) SelectExprs(appendValue, copyValue bool, expressions ...Expression) Expression

SelectExprs ports Select.select (expressions/query.py:1307-1340): it appends projections, or replaces them when appendValue is false. (Named SelectExprs because Node.Selects already returns the projections.)

func (*Node) Selects

func (n *Node) Selects() []Expression

func (*Node) Set

func (n *Node) Set(key string, val any)

func (*Node) SetAt

func (n *Node) SetAt(key string, val any, index int, overwrite bool)

func (*Node) SetParent

func (n *Node) SetParent(p Expression, key string, idx int)

func (*Node) SetSpan

func (n *Node) SetSpan(start, end int)

SetSpan records the node's source span: rune offsets into the SQL string it was parsed from, start inclusive, end exclusive (token Start/End are both inclusive; this is [Start, End+1)).

func (*Node) SetSpanText

func (n *Node) SetSpanText(text string)

SetSpanText records the node's verbatim source text — the exact original spelling, quotes, casing, and spacing included.

func (*Node) SetType

func (n *Node) SetType(dtype any)

SetType ports the Expression.type setter: a DType, a type string or an Expression is built into a DataType (a DataType is used as-is); nil clears the type. A value that can't be built clears it too.

func (*Node) Span

func (n *Node) Span() (start, end int, ok bool)

Span returns the source span recorded by SetSpan; ok is false when the node has none.

func (*Node) SpanText

func (n *Node) SpanText() (text string, ok bool)

SpanText returns the verbatim source text recorded by SetSpanText; ok is false when the node has none.

func (*Node) Subquery

func (n *Node) Subquery(alias string, copyValue bool) Expression

Subquery ports Query.subquery (expressions/query.py:130-150): it wraps the query in a Subquery aliased alias ("" for none).

func (*Node) TableName

func (n *Node) TableName() string

func (*Node) Text

func (n *Node) Text(key string) string

func (*Node) This

func (n *Node) This() Expression

func (*Node) ToColumn

func (n *Node) ToColumn() Expression

ToColumn ports Table.to_column (expressions/query.py:1004-1018): the table's rightmost part qualified by the parts before it — a Column for up to four parts, a Dot chain beyond that — with the table's alias carried along as an Alias wrapper. A non-Identifier last part (a function or array wrapped in a Table) is returned as-is, matching upstream's fallback branch.

func (*Node) ToPy

func (n *Node) ToPy() any

func (*Node) ToS

func (n *Node) ToS() string

func (*Node) Transform

func (n *Node) Transform(fun func(Expression) Expression, copyValue bool) Expression

Transform ports Expression.transform (expressions/core.py:1253-1270): it visits the tree depth-first, replacing each node with fun(node) and not descending into a replacement.

func (*Node) Type

func (n *Node) Type() Expression

Type ports the Expression.type getter: a DataType is its own type, a cast defaults to its target type, and any other expression has the type annotate_types set (nil when none).

func (*Node) Unalias

func (n *Node) Unalias() Expression

Unalias ports Expression.unalias (expressions/core.py:1224-1227).

func (*Node) Unnest

func (n *Node) Unnest() Expression

func (*Node) Unwrap

func (n *Node) Unwrap() Expression

func (*Node) Walk

func (n *Node) Walk(bfsOpt ...bool) []Expression

func (*Node) WalkWithPrune

func (n *Node) WalkWithPrune(bfs bool, prune func(Expression) bool) []Expression

func (*Node) Where

func (n *Node) Where(appendValue, copyValue bool, expressions ...Expression) Expression

Where ports Query.where (expressions/query.py:265-300): it ANDs the conditions into the query's WHERE (a Where node's condition is taken as-is), replacing it when appendValue is false.

type Target

type Target interface {
	// contains filtered or unexported methods
}

type Trait

type Trait uint32
const (
	TraitCondition Trait = 1 << iota
	TraitPredicate
	TraitBinary
	TraitConnector
	TraitFunc
	TraitAggFunc
	TraitUnary
	TraitQuery
	TraitDDL
	TraitDML
	TraitUDTF
	TraitDerivedTable
	TraitSetOperation
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL