org.partiql.lang.domains.PartiqlAstToPartiqlLogical.generated.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of partiql-lang-kotlin Show documentation
Show all versions of partiql-lang-kotlin Show documentation
An implementation of PartiQL for the JVM written in Kotlin.
/**
* This code was generated by the PartiQL I.R. Generator.
* Do not modify this file.
*/
@file:Suppress("unused", "MemberVisibilityCanBePrivate", "FunctionName",
"CanBePrimaryConstructorProperty", "UNNECESSARY_SAFE_CALL",
"USELESS_ELVIS", "RemoveRedundantQualifierName", "LocalVariableName")
package org.partiql.lang.domains
import com.amazon.ionelement.api.*
import org.partiql.pig.runtime.*
abstract class PartiqlAstToPartiqlLogicalVisitorTransform : DomainVisitorTransformBase() {
//////////////////////////////////////
// Tuple Types
//////////////////////////////////////
// Tuple TimeValue
open fun transformTimeValue(node: PartiqlAst.TimeValue): PartiqlLogical.TimeValue {
val new_hour = transformTimeValue_hour(node)
val new_minute = transformTimeValue_minute(node)
val new_second = transformTimeValue_second(node)
val new_nano = transformTimeValue_nano(node)
val new_precision = transformTimeValue_precision(node)
val new_withTimeZone = transformTimeValue_withTimeZone(node)
val new_tzMinutes = transformTimeValue_tzMinutes(node)
val new_metas = transformTimeValue_metas(node)
return PartiqlLogical.TimeValue(
hour = new_hour,
minute = new_minute,
second = new_second,
nano = new_nano,
precision = new_precision,
withTimeZone = new_withTimeZone,
tzMinutes = new_tzMinutes,
metas = new_metas
)
}
open fun transformTimeValue_hour(node: PartiqlAst.TimeValue) =
transformLongPrimitive(node.hour)
open fun transformTimeValue_minute(node: PartiqlAst.TimeValue) =
transformLongPrimitive(node.minute)
open fun transformTimeValue_second(node: PartiqlAst.TimeValue) =
transformLongPrimitive(node.second)
open fun transformTimeValue_nano(node: PartiqlAst.TimeValue) =
transformLongPrimitive(node.nano)
open fun transformTimeValue_precision(node: PartiqlAst.TimeValue) =
transformLongPrimitive(node.precision)
open fun transformTimeValue_withTimeZone(node: PartiqlAst.TimeValue) =
transformBoolPrimitive(node.withTimeZone)
open fun transformTimeValue_tzMinutes(node: PartiqlAst.TimeValue) =
node.tzMinutes?.let { transformLongPrimitive(it) }
open fun transformTimeValue_metas(node: PartiqlAst.TimeValue) =
transformMetas(node.metas)
abstract fun transformLetBinding(node:PartiqlAst.LetBinding): PartiqlLogical.LetBinding
// Tuple GraphMatchQuantifier
open fun transformGraphMatchQuantifier(node: PartiqlAst.GraphMatchQuantifier): PartiqlLogical.GraphMatchQuantifier {
val new_lower = transformGraphMatchQuantifier_lower(node)
val new_upper = transformGraphMatchQuantifier_upper(node)
val new_metas = transformGraphMatchQuantifier_metas(node)
return PartiqlLogical.GraphMatchQuantifier(
lower = new_lower,
upper = new_upper,
metas = new_metas
)
}
open fun transformGraphMatchQuantifier_lower(node: PartiqlAst.GraphMatchQuantifier) =
transformLongPrimitive(node.lower)
open fun transformGraphMatchQuantifier_upper(node: PartiqlAst.GraphMatchQuantifier) =
node.upper?.let { transformLongPrimitive(it) }
open fun transformGraphMatchQuantifier_metas(node: PartiqlAst.GraphMatchQuantifier) =
transformMetas(node.metas)
// Tuple GraphMatchPattern
open fun transformGraphMatchPattern(node: PartiqlAst.GraphMatchPattern): PartiqlLogical.GraphMatchPattern {
val new_restrictor = transformGraphMatchPattern_restrictor(node)
val new_prefilter = transformGraphMatchPattern_prefilter(node)
val new_variable = transformGraphMatchPattern_variable(node)
val new_quantifier = transformGraphMatchPattern_quantifier(node)
val new_parts = transformGraphMatchPattern_parts(node)
val new_metas = transformGraphMatchPattern_metas(node)
return PartiqlLogical.GraphMatchPattern(
restrictor = new_restrictor,
prefilter = new_prefilter,
variable = new_variable,
quantifier = new_quantifier,
parts = new_parts,
metas = new_metas
)
}
open fun transformGraphMatchPattern_restrictor(node: PartiqlAst.GraphMatchPattern) =
node.restrictor?.let { transformGraphMatchRestrictor(it) }
open fun transformGraphMatchPattern_prefilter(node: PartiqlAst.GraphMatchPattern) =
node.prefilter?.let { transformExpr(it) }
open fun transformGraphMatchPattern_variable(node: PartiqlAst.GraphMatchPattern) =
node.variable?.let { transformSymbolPrimitive(it) }
open fun transformGraphMatchPattern_quantifier(node: PartiqlAst.GraphMatchPattern) =
node.quantifier?.let { transformGraphMatchQuantifier(it) }
open fun transformGraphMatchPattern_parts(node: PartiqlAst.GraphMatchPattern) =
node.parts.map { transformGraphMatchPatternPart(it) }
open fun transformGraphMatchPattern_metas(node: PartiqlAst.GraphMatchPattern) =
transformMetas(node.metas)
// Tuple GpmlPattern
open fun transformGpmlPattern(node: PartiqlAst.GpmlPattern): PartiqlLogical.GpmlPattern {
val new_selector = transformGpmlPattern_selector(node)
val new_patterns = transformGpmlPattern_patterns(node)
val new_metas = transformGpmlPattern_metas(node)
return PartiqlLogical.GpmlPattern(
selector = new_selector,
patterns = new_patterns,
metas = new_metas
)
}
open fun transformGpmlPattern_selector(node: PartiqlAst.GpmlPattern) =
node.selector?.let { transformGraphMatchSelector(it) }
open fun transformGpmlPattern_patterns(node: PartiqlAst.GpmlPattern) =
node.patterns.map { transformGraphMatchPattern(it) }
open fun transformGpmlPattern_metas(node: PartiqlAst.GpmlPattern) =
transformMetas(node.metas)
// Tuple ExprPair
open fun transformExprPair(node: PartiqlAst.ExprPair): PartiqlLogical.ExprPair {
val new_first = transformExprPair_first(node)
val new_second = transformExprPair_second(node)
val new_metas = transformExprPair_metas(node)
return PartiqlLogical.ExprPair(
first = new_first,
second = new_second,
metas = new_metas
)
}
open fun transformExprPair_first(node: PartiqlAst.ExprPair) =
transformExpr(node.first)
open fun transformExprPair_second(node: PartiqlAst.ExprPair) =
transformExpr(node.second)
open fun transformExprPair_metas(node: PartiqlAst.ExprPair) =
transformMetas(node.metas)
// Tuple ExprPairList
open fun transformExprPairList(node: PartiqlAst.ExprPairList): PartiqlLogical.ExprPairList {
val new_pairs = transformExprPairList_pairs(node)
val new_metas = transformExprPairList_metas(node)
return PartiqlLogical.ExprPairList(
pairs = new_pairs,
metas = new_metas
)
}
open fun transformExprPairList_pairs(node: PartiqlAst.ExprPairList) =
node.pairs.map { transformExprPair(it) }
open fun transformExprPairList_metas(node: PartiqlAst.ExprPairList) =
transformMetas(node.metas)
// Tuple GroupKeyList
open fun transformGroupKeyList(node: PartiqlAst.GroupKeyList): PartiqlLogical.GroupKeyList {
val new_keys = transformGroupKeyList_keys(node)
val new_metas = transformGroupKeyList_metas(node)
return PartiqlLogical.GroupKeyList(
keys = new_keys,
metas = new_metas
)
}
open fun transformGroupKeyList_keys(node: PartiqlAst.GroupKeyList) =
node.keys.map { transformGroupKey(it) }
open fun transformGroupKeyList_metas(node: PartiqlAst.GroupKeyList) =
transformMetas(node.metas)
abstract fun transformGroupKey(node:PartiqlAst.GroupKey): PartiqlLogical.GroupKey
// Tuple SortSpec
open fun transformSortSpec(node: PartiqlAst.SortSpec): PartiqlLogical.SortSpec {
val new_expr = transformSortSpec_expr(node)
val new_orderingSpec = transformSortSpec_orderingSpec(node)
val new_nullsSpec = transformSortSpec_nullsSpec(node)
val new_metas = transformSortSpec_metas(node)
return PartiqlLogical.SortSpec(
expr = new_expr,
orderingSpec = new_orderingSpec,
nullsSpec = new_nullsSpec,
metas = new_metas
)
}
open fun transformSortSpec_expr(node: PartiqlAst.SortSpec) =
transformExpr(node.expr)
open fun transformSortSpec_orderingSpec(node: PartiqlAst.SortSpec) =
node.orderingSpec?.let { transformOrderingSpec(it) }
open fun transformSortSpec_nullsSpec(node: PartiqlAst.SortSpec) =
node.nullsSpec?.let { transformNullsSpec(it) }
open fun transformSortSpec_metas(node: PartiqlAst.SortSpec) =
transformMetas(node.metas)
// Tuple Over
open fun transformOver(node: PartiqlAst.Over): PartiqlLogical.Over {
val new_partitionBy = transformOver_partitionBy(node)
val new_orderBy = transformOver_orderBy(node)
val new_metas = transformOver_metas(node)
return PartiqlLogical.Over(
partitionBy = new_partitionBy,
orderBy = new_orderBy,
metas = new_metas
)
}
open fun transformOver_partitionBy(node: PartiqlAst.Over) =
node.partitionBy?.let { transformWindowPartitionList(it) }
open fun transformOver_orderBy(node: PartiqlAst.Over) =
node.orderBy?.let { transformWindowSortSpecList(it) }
open fun transformOver_metas(node: PartiqlAst.Over) =
transformMetas(node.metas)
// Tuple WindowPartitionList
open fun transformWindowPartitionList(node: PartiqlAst.WindowPartitionList): PartiqlLogical.WindowPartitionList {
val new_exprs = transformWindowPartitionList_exprs(node)
val new_metas = transformWindowPartitionList_metas(node)
return PartiqlLogical.WindowPartitionList(
exprs = new_exprs,
metas = new_metas
)
}
open fun transformWindowPartitionList_exprs(node: PartiqlAst.WindowPartitionList) =
node.exprs.map { transformExpr(it) }
open fun transformWindowPartitionList_metas(node: PartiqlAst.WindowPartitionList) =
transformMetas(node.metas)
// Tuple WindowSortSpecList
open fun transformWindowSortSpecList(node: PartiqlAst.WindowSortSpecList): PartiqlLogical.WindowSortSpecList {
val new_sortSpecs = transformWindowSortSpecList_sortSpecs(node)
val new_metas = transformWindowSortSpecList_metas(node)
return PartiqlLogical.WindowSortSpecList(
sortSpecs = new_sortSpecs,
metas = new_metas
)
}
open fun transformWindowSortSpecList_sortSpecs(node: PartiqlAst.WindowSortSpecList) =
node.sortSpecs.map { transformSortSpec(it) }
open fun transformWindowSortSpecList_metas(node: PartiqlAst.WindowSortSpecList) =
transformMetas(node.metas)
// Tuple Identifier
open fun transformIdentifier(node: PartiqlAst.Identifier): PartiqlLogical.Identifier {
val new_name = transformIdentifier_name(node)
val new_case = transformIdentifier_case(node)
val new_metas = transformIdentifier_metas(node)
return PartiqlLogical.Identifier(
name = new_name,
case = new_case,
metas = new_metas
)
}
open fun transformIdentifier_name(node: PartiqlAst.Identifier) =
transformSymbolPrimitive(node.name)
open fun transformIdentifier_case(node: PartiqlAst.Identifier) =
transformCaseSensitivity(node.case)
open fun transformIdentifier_metas(node: PartiqlAst.Identifier) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: Statement
//////////////////////////////////////
open fun transformStatement(node: PartiqlAst.Statement): PartiqlLogical.Statement =
when(node) {
is PartiqlAst.Statement.Query -> transformStatementQuery(node)
is PartiqlAst.Statement.Dml -> transformStatementDml(node)
is PartiqlAst.Statement.Ddl -> transformStatementDdl(node)
is PartiqlAst.Statement.Exec -> transformStatementExec(node)
is PartiqlAst.Statement.Explain -> transformStatementExplain(node)
}
// Variant StatementQuery
open fun transformStatementQuery(node: PartiqlAst.Statement.Query): PartiqlLogical.Statement {
val new_expr = transformStatementQuery_expr(node)
val new_metas = transformStatementQuery_metas(node)
return PartiqlLogical.Statement.Query(
expr = new_expr,
metas = new_metas
)
}
open fun transformStatementQuery_expr(node: PartiqlAst.Statement.Query) =
transformExpr(node.expr)
open fun transformStatementQuery_metas(node: PartiqlAst.Statement.Query) =
transformMetas(node.metas)
// Variant StatementDml
abstract fun transformStatementDml(node: PartiqlAst.Statement.Dml): PartiqlLogical.Statement
// Variant StatementDdl
abstract fun transformStatementDdl(node: PartiqlAst.Statement.Ddl): PartiqlLogical.Statement
// Variant StatementExec
open fun transformStatementExec(node: PartiqlAst.Statement.Exec): PartiqlLogical.Statement {
val new_procedureName = transformStatementExec_procedureName(node)
val new_args = transformStatementExec_args(node)
val new_metas = transformStatementExec_metas(node)
return PartiqlLogical.Statement.Exec(
procedureName = new_procedureName,
args = new_args,
metas = new_metas
)
}
open fun transformStatementExec_procedureName(node: PartiqlAst.Statement.Exec) =
transformSymbolPrimitive(node.procedureName)
open fun transformStatementExec_args(node: PartiqlAst.Statement.Exec) =
node.args.map { transformExpr(it) }
open fun transformStatementExec_metas(node: PartiqlAst.Statement.Exec) =
transformMetas(node.metas)
// Variant StatementExplain
open fun transformStatementExplain(node: PartiqlAst.Statement.Explain): PartiqlLogical.Statement {
val new_target = transformStatementExplain_target(node)
val new_metas = transformStatementExplain_metas(node)
return PartiqlLogical.Statement.Explain(
target = new_target,
metas = new_metas
)
}
open fun transformStatementExplain_target(node: PartiqlAst.Statement.Explain) =
transformExplainTarget(node.target)
open fun transformStatementExplain_metas(node: PartiqlAst.Statement.Explain) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: ExplainTarget
//////////////////////////////////////
open fun transformExplainTarget(node: PartiqlAst.ExplainTarget): PartiqlLogical.ExplainTarget =
when(node) {
is PartiqlAst.ExplainTarget.Domain -> transformExplainTargetDomain(node)
}
// Variant ExplainTargetDomain
open fun transformExplainTargetDomain(node: PartiqlAst.ExplainTarget.Domain): PartiqlLogical.ExplainTarget {
val new_statement = transformExplainTargetDomain_statement(node)
val new_type = transformExplainTargetDomain_type(node)
val new_format = transformExplainTargetDomain_format(node)
val new_metas = transformExplainTargetDomain_metas(node)
return PartiqlLogical.ExplainTarget.Domain(
statement = new_statement,
type = new_type,
format = new_format,
metas = new_metas
)
}
open fun transformExplainTargetDomain_statement(node: PartiqlAst.ExplainTarget.Domain) =
transformStatement(node.statement)
open fun transformExplainTargetDomain_type(node: PartiqlAst.ExplainTarget.Domain) =
node.type?.let { transformSymbolPrimitive(it) }
open fun transformExplainTargetDomain_format(node: PartiqlAst.ExplainTarget.Domain) =
node.format?.let { transformSymbolPrimitive(it) }
open fun transformExplainTargetDomain_metas(node: PartiqlAst.ExplainTarget.Domain) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: Expr
//////////////////////////////////////
open fun transformExpr(node: PartiqlAst.Expr): PartiqlLogical.Expr =
when(node) {
is PartiqlAst.Expr.Missing -> transformExprMissing(node)
is PartiqlAst.Expr.Lit -> transformExprLit(node)
is PartiqlAst.Expr.Id -> transformExprId(node)
is PartiqlAst.Expr.Parameter -> transformExprParameter(node)
is PartiqlAst.Expr.Not -> transformExprNot(node)
is PartiqlAst.Expr.Pos -> transformExprPos(node)
is PartiqlAst.Expr.Neg -> transformExprNeg(node)
is PartiqlAst.Expr.Plus -> transformExprPlus(node)
is PartiqlAst.Expr.Minus -> transformExprMinus(node)
is PartiqlAst.Expr.Times -> transformExprTimes(node)
is PartiqlAst.Expr.Divide -> transformExprDivide(node)
is PartiqlAst.Expr.Modulo -> transformExprModulo(node)
is PartiqlAst.Expr.Concat -> transformExprConcat(node)
is PartiqlAst.Expr.And -> transformExprAnd(node)
is PartiqlAst.Expr.Or -> transformExprOr(node)
is PartiqlAst.Expr.Eq -> transformExprEq(node)
is PartiqlAst.Expr.Ne -> transformExprNe(node)
is PartiqlAst.Expr.Gt -> transformExprGt(node)
is PartiqlAst.Expr.Gte -> transformExprGte(node)
is PartiqlAst.Expr.Lt -> transformExprLt(node)
is PartiqlAst.Expr.Lte -> transformExprLte(node)
is PartiqlAst.Expr.Like -> transformExprLike(node)
is PartiqlAst.Expr.Between -> transformExprBetween(node)
is PartiqlAst.Expr.InCollection -> transformExprInCollection(node)
is PartiqlAst.Expr.IsType -> transformExprIsType(node)
is PartiqlAst.Expr.SimpleCase -> transformExprSimpleCase(node)
is PartiqlAst.Expr.SearchedCase -> transformExprSearchedCase(node)
is PartiqlAst.Expr.Struct -> transformExprStruct(node)
is PartiqlAst.Expr.Bag -> transformExprBag(node)
is PartiqlAst.Expr.List -> transformExprList(node)
is PartiqlAst.Expr.Sexp -> transformExprSexp(node)
is PartiqlAst.Expr.Date -> transformExprDate(node)
is PartiqlAst.Expr.LitTime -> transformExprLitTime(node)
is PartiqlAst.Expr.BagOp -> transformExprBagOp(node)
is PartiqlAst.Expr.GraphMatch -> transformExprGraphMatch(node)
is PartiqlAst.Expr.Path -> transformExprPath(node)
is PartiqlAst.Expr.Call -> transformExprCall(node)
is PartiqlAst.Expr.CallAgg -> transformExprCallAgg(node)
is PartiqlAst.Expr.CallWindow -> transformExprCallWindow(node)
is PartiqlAst.Expr.Cast -> transformExprCast(node)
is PartiqlAst.Expr.CanCast -> transformExprCanCast(node)
is PartiqlAst.Expr.CanLosslessCast -> transformExprCanLosslessCast(node)
is PartiqlAst.Expr.NullIf -> transformExprNullIf(node)
is PartiqlAst.Expr.Coalesce -> transformExprCoalesce(node)
is PartiqlAst.Expr.Select -> transformExprSelect(node)
}
// Variant ExprMissing
open fun transformExprMissing(node: PartiqlAst.Expr.Missing): PartiqlLogical.Expr {
val new_metas = transformExprMissing_metas(node)
return PartiqlLogical.Expr.Missing(
metas = new_metas
)
}
open fun transformExprMissing_metas(node: PartiqlAst.Expr.Missing) =
transformMetas(node.metas)
// Variant ExprLit
open fun transformExprLit(node: PartiqlAst.Expr.Lit): PartiqlLogical.Expr {
val new_value = transformExprLit_value(node)
val new_metas = transformExprLit_metas(node)
return PartiqlLogical.Expr.Lit(
value = new_value,
metas = new_metas
)
}
open fun transformExprLit_value(node: PartiqlAst.Expr.Lit) =
transformAnyElement(node.value)
open fun transformExprLit_metas(node: PartiqlAst.Expr.Lit) =
transformMetas(node.metas)
// Variant ExprId
open fun transformExprId(node: PartiqlAst.Expr.Id): PartiqlLogical.Expr {
val new_name = transformExprId_name(node)
val new_case = transformExprId_case(node)
val new_qualifier = transformExprId_qualifier(node)
val new_metas = transformExprId_metas(node)
return PartiqlLogical.Expr.Id(
name = new_name,
case = new_case,
qualifier = new_qualifier,
metas = new_metas
)
}
open fun transformExprId_name(node: PartiqlAst.Expr.Id) =
transformSymbolPrimitive(node.name)
open fun transformExprId_case(node: PartiqlAst.Expr.Id) =
transformCaseSensitivity(node.case)
open fun transformExprId_qualifier(node: PartiqlAst.Expr.Id) =
transformScopeQualifier(node.qualifier)
open fun transformExprId_metas(node: PartiqlAst.Expr.Id) =
transformMetas(node.metas)
// Variant ExprParameter
open fun transformExprParameter(node: PartiqlAst.Expr.Parameter): PartiqlLogical.Expr {
val new_index = transformExprParameter_index(node)
val new_metas = transformExprParameter_metas(node)
return PartiqlLogical.Expr.Parameter(
index = new_index,
metas = new_metas
)
}
open fun transformExprParameter_index(node: PartiqlAst.Expr.Parameter) =
transformLongPrimitive(node.index)
open fun transformExprParameter_metas(node: PartiqlAst.Expr.Parameter) =
transformMetas(node.metas)
// Variant ExprNot
open fun transformExprNot(node: PartiqlAst.Expr.Not): PartiqlLogical.Expr {
val new_expr = transformExprNot_expr(node)
val new_metas = transformExprNot_metas(node)
return PartiqlLogical.Expr.Not(
expr = new_expr,
metas = new_metas
)
}
open fun transformExprNot_expr(node: PartiqlAst.Expr.Not) =
transformExpr(node.expr)
open fun transformExprNot_metas(node: PartiqlAst.Expr.Not) =
transformMetas(node.metas)
// Variant ExprPos
open fun transformExprPos(node: PartiqlAst.Expr.Pos): PartiqlLogical.Expr {
val new_expr = transformExprPos_expr(node)
val new_metas = transformExprPos_metas(node)
return PartiqlLogical.Expr.Pos(
expr = new_expr,
metas = new_metas
)
}
open fun transformExprPos_expr(node: PartiqlAst.Expr.Pos) =
transformExpr(node.expr)
open fun transformExprPos_metas(node: PartiqlAst.Expr.Pos) =
transformMetas(node.metas)
// Variant ExprNeg
open fun transformExprNeg(node: PartiqlAst.Expr.Neg): PartiqlLogical.Expr {
val new_expr = transformExprNeg_expr(node)
val new_metas = transformExprNeg_metas(node)
return PartiqlLogical.Expr.Neg(
expr = new_expr,
metas = new_metas
)
}
open fun transformExprNeg_expr(node: PartiqlAst.Expr.Neg) =
transformExpr(node.expr)
open fun transformExprNeg_metas(node: PartiqlAst.Expr.Neg) =
transformMetas(node.metas)
// Variant ExprPlus
open fun transformExprPlus(node: PartiqlAst.Expr.Plus): PartiqlLogical.Expr {
val new_operands = transformExprPlus_operands(node)
val new_metas = transformExprPlus_metas(node)
return PartiqlLogical.Expr.Plus(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprPlus_operands(node: PartiqlAst.Expr.Plus) =
node.operands.map { transformExpr(it) }
open fun transformExprPlus_metas(node: PartiqlAst.Expr.Plus) =
transformMetas(node.metas)
// Variant ExprMinus
open fun transformExprMinus(node: PartiqlAst.Expr.Minus): PartiqlLogical.Expr {
val new_operands = transformExprMinus_operands(node)
val new_metas = transformExprMinus_metas(node)
return PartiqlLogical.Expr.Minus(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprMinus_operands(node: PartiqlAst.Expr.Minus) =
node.operands.map { transformExpr(it) }
open fun transformExprMinus_metas(node: PartiqlAst.Expr.Minus) =
transformMetas(node.metas)
// Variant ExprTimes
open fun transformExprTimes(node: PartiqlAst.Expr.Times): PartiqlLogical.Expr {
val new_operands = transformExprTimes_operands(node)
val new_metas = transformExprTimes_metas(node)
return PartiqlLogical.Expr.Times(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprTimes_operands(node: PartiqlAst.Expr.Times) =
node.operands.map { transformExpr(it) }
open fun transformExprTimes_metas(node: PartiqlAst.Expr.Times) =
transformMetas(node.metas)
// Variant ExprDivide
open fun transformExprDivide(node: PartiqlAst.Expr.Divide): PartiqlLogical.Expr {
val new_operands = transformExprDivide_operands(node)
val new_metas = transformExprDivide_metas(node)
return PartiqlLogical.Expr.Divide(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprDivide_operands(node: PartiqlAst.Expr.Divide) =
node.operands.map { transformExpr(it) }
open fun transformExprDivide_metas(node: PartiqlAst.Expr.Divide) =
transformMetas(node.metas)
// Variant ExprModulo
open fun transformExprModulo(node: PartiqlAst.Expr.Modulo): PartiqlLogical.Expr {
val new_operands = transformExprModulo_operands(node)
val new_metas = transformExprModulo_metas(node)
return PartiqlLogical.Expr.Modulo(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprModulo_operands(node: PartiqlAst.Expr.Modulo) =
node.operands.map { transformExpr(it) }
open fun transformExprModulo_metas(node: PartiqlAst.Expr.Modulo) =
transformMetas(node.metas)
// Variant ExprConcat
open fun transformExprConcat(node: PartiqlAst.Expr.Concat): PartiqlLogical.Expr {
val new_operands = transformExprConcat_operands(node)
val new_metas = transformExprConcat_metas(node)
return PartiqlLogical.Expr.Concat(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprConcat_operands(node: PartiqlAst.Expr.Concat) =
node.operands.map { transformExpr(it) }
open fun transformExprConcat_metas(node: PartiqlAst.Expr.Concat) =
transformMetas(node.metas)
// Variant ExprAnd
open fun transformExprAnd(node: PartiqlAst.Expr.And): PartiqlLogical.Expr {
val new_operands = transformExprAnd_operands(node)
val new_metas = transformExprAnd_metas(node)
return PartiqlLogical.Expr.And(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprAnd_operands(node: PartiqlAst.Expr.And) =
node.operands.map { transformExpr(it) }
open fun transformExprAnd_metas(node: PartiqlAst.Expr.And) =
transformMetas(node.metas)
// Variant ExprOr
open fun transformExprOr(node: PartiqlAst.Expr.Or): PartiqlLogical.Expr {
val new_operands = transformExprOr_operands(node)
val new_metas = transformExprOr_metas(node)
return PartiqlLogical.Expr.Or(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprOr_operands(node: PartiqlAst.Expr.Or) =
node.operands.map { transformExpr(it) }
open fun transformExprOr_metas(node: PartiqlAst.Expr.Or) =
transformMetas(node.metas)
// Variant ExprEq
open fun transformExprEq(node: PartiqlAst.Expr.Eq): PartiqlLogical.Expr {
val new_operands = transformExprEq_operands(node)
val new_metas = transformExprEq_metas(node)
return PartiqlLogical.Expr.Eq(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprEq_operands(node: PartiqlAst.Expr.Eq) =
node.operands.map { transformExpr(it) }
open fun transformExprEq_metas(node: PartiqlAst.Expr.Eq) =
transformMetas(node.metas)
// Variant ExprNe
open fun transformExprNe(node: PartiqlAst.Expr.Ne): PartiqlLogical.Expr {
val new_operands = transformExprNe_operands(node)
val new_metas = transformExprNe_metas(node)
return PartiqlLogical.Expr.Ne(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprNe_operands(node: PartiqlAst.Expr.Ne) =
node.operands.map { transformExpr(it) }
open fun transformExprNe_metas(node: PartiqlAst.Expr.Ne) =
transformMetas(node.metas)
// Variant ExprGt
open fun transformExprGt(node: PartiqlAst.Expr.Gt): PartiqlLogical.Expr {
val new_operands = transformExprGt_operands(node)
val new_metas = transformExprGt_metas(node)
return PartiqlLogical.Expr.Gt(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprGt_operands(node: PartiqlAst.Expr.Gt) =
node.operands.map { transformExpr(it) }
open fun transformExprGt_metas(node: PartiqlAst.Expr.Gt) =
transformMetas(node.metas)
// Variant ExprGte
open fun transformExprGte(node: PartiqlAst.Expr.Gte): PartiqlLogical.Expr {
val new_operands = transformExprGte_operands(node)
val new_metas = transformExprGte_metas(node)
return PartiqlLogical.Expr.Gte(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprGte_operands(node: PartiqlAst.Expr.Gte) =
node.operands.map { transformExpr(it) }
open fun transformExprGte_metas(node: PartiqlAst.Expr.Gte) =
transformMetas(node.metas)
// Variant ExprLt
open fun transformExprLt(node: PartiqlAst.Expr.Lt): PartiqlLogical.Expr {
val new_operands = transformExprLt_operands(node)
val new_metas = transformExprLt_metas(node)
return PartiqlLogical.Expr.Lt(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprLt_operands(node: PartiqlAst.Expr.Lt) =
node.operands.map { transformExpr(it) }
open fun transformExprLt_metas(node: PartiqlAst.Expr.Lt) =
transformMetas(node.metas)
// Variant ExprLte
open fun transformExprLte(node: PartiqlAst.Expr.Lte): PartiqlLogical.Expr {
val new_operands = transformExprLte_operands(node)
val new_metas = transformExprLte_metas(node)
return PartiqlLogical.Expr.Lte(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprLte_operands(node: PartiqlAst.Expr.Lte) =
node.operands.map { transformExpr(it) }
open fun transformExprLte_metas(node: PartiqlAst.Expr.Lte) =
transformMetas(node.metas)
// Variant ExprLike
open fun transformExprLike(node: PartiqlAst.Expr.Like): PartiqlLogical.Expr {
val new_value = transformExprLike_value(node)
val new_pattern = transformExprLike_pattern(node)
val new_escape = transformExprLike_escape(node)
val new_metas = transformExprLike_metas(node)
return PartiqlLogical.Expr.Like(
value = new_value,
pattern = new_pattern,
escape = new_escape,
metas = new_metas
)
}
open fun transformExprLike_value(node: PartiqlAst.Expr.Like) =
transformExpr(node.value)
open fun transformExprLike_pattern(node: PartiqlAst.Expr.Like) =
transformExpr(node.pattern)
open fun transformExprLike_escape(node: PartiqlAst.Expr.Like) =
node.escape?.let { transformExpr(it) }
open fun transformExprLike_metas(node: PartiqlAst.Expr.Like) =
transformMetas(node.metas)
// Variant ExprBetween
open fun transformExprBetween(node: PartiqlAst.Expr.Between): PartiqlLogical.Expr {
val new_value = transformExprBetween_value(node)
val new_from = transformExprBetween_from(node)
val new_to = transformExprBetween_to(node)
val new_metas = transformExprBetween_metas(node)
return PartiqlLogical.Expr.Between(
value = new_value,
from = new_from,
to = new_to,
metas = new_metas
)
}
open fun transformExprBetween_value(node: PartiqlAst.Expr.Between) =
transformExpr(node.value)
open fun transformExprBetween_from(node: PartiqlAst.Expr.Between) =
transformExpr(node.from)
open fun transformExprBetween_to(node: PartiqlAst.Expr.Between) =
transformExpr(node.to)
open fun transformExprBetween_metas(node: PartiqlAst.Expr.Between) =
transformMetas(node.metas)
// Variant ExprInCollection
open fun transformExprInCollection(node: PartiqlAst.Expr.InCollection): PartiqlLogical.Expr {
val new_operands = transformExprInCollection_operands(node)
val new_metas = transformExprInCollection_metas(node)
return PartiqlLogical.Expr.InCollection(
operands = new_operands,
metas = new_metas
)
}
open fun transformExprInCollection_operands(node: PartiqlAst.Expr.InCollection) =
node.operands.map { transformExpr(it) }
open fun transformExprInCollection_metas(node: PartiqlAst.Expr.InCollection) =
transformMetas(node.metas)
// Variant ExprIsType
open fun transformExprIsType(node: PartiqlAst.Expr.IsType): PartiqlLogical.Expr {
val new_value = transformExprIsType_value(node)
val new_type = transformExprIsType_type(node)
val new_metas = transformExprIsType_metas(node)
return PartiqlLogical.Expr.IsType(
value = new_value,
type = new_type,
metas = new_metas
)
}
open fun transformExprIsType_value(node: PartiqlAst.Expr.IsType) =
transformExpr(node.value)
open fun transformExprIsType_type(node: PartiqlAst.Expr.IsType) =
transformType(node.type)
open fun transformExprIsType_metas(node: PartiqlAst.Expr.IsType) =
transformMetas(node.metas)
// Variant ExprSimpleCase
open fun transformExprSimpleCase(node: PartiqlAst.Expr.SimpleCase): PartiqlLogical.Expr {
val new_expr = transformExprSimpleCase_expr(node)
val new_cases = transformExprSimpleCase_cases(node)
val new_default = transformExprSimpleCase_default(node)
val new_metas = transformExprSimpleCase_metas(node)
return PartiqlLogical.Expr.SimpleCase(
expr = new_expr,
cases = new_cases,
default = new_default,
metas = new_metas
)
}
open fun transformExprSimpleCase_expr(node: PartiqlAst.Expr.SimpleCase) =
transformExpr(node.expr)
open fun transformExprSimpleCase_cases(node: PartiqlAst.Expr.SimpleCase) =
transformExprPairList(node.cases)
open fun transformExprSimpleCase_default(node: PartiqlAst.Expr.SimpleCase) =
node.default?.let { transformExpr(it) }
open fun transformExprSimpleCase_metas(node: PartiqlAst.Expr.SimpleCase) =
transformMetas(node.metas)
// Variant ExprSearchedCase
open fun transformExprSearchedCase(node: PartiqlAst.Expr.SearchedCase): PartiqlLogical.Expr {
val new_cases = transformExprSearchedCase_cases(node)
val new_default = transformExprSearchedCase_default(node)
val new_metas = transformExprSearchedCase_metas(node)
return PartiqlLogical.Expr.SearchedCase(
cases = new_cases,
default = new_default,
metas = new_metas
)
}
open fun transformExprSearchedCase_cases(node: PartiqlAst.Expr.SearchedCase) =
transformExprPairList(node.cases)
open fun transformExprSearchedCase_default(node: PartiqlAst.Expr.SearchedCase) =
node.default?.let { transformExpr(it) }
open fun transformExprSearchedCase_metas(node: PartiqlAst.Expr.SearchedCase) =
transformMetas(node.metas)
// Variant ExprStruct
abstract fun transformExprStruct(node: PartiqlAst.Expr.Struct): PartiqlLogical.Expr
// Variant ExprBag
open fun transformExprBag(node: PartiqlAst.Expr.Bag): PartiqlLogical.Expr {
val new_values = transformExprBag_values(node)
val new_metas = transformExprBag_metas(node)
return PartiqlLogical.Expr.Bag(
values = new_values,
metas = new_metas
)
}
open fun transformExprBag_values(node: PartiqlAst.Expr.Bag) =
node.values.map { transformExpr(it) }
open fun transformExprBag_metas(node: PartiqlAst.Expr.Bag) =
transformMetas(node.metas)
// Variant ExprList
open fun transformExprList(node: PartiqlAst.Expr.List): PartiqlLogical.Expr {
val new_values = transformExprList_values(node)
val new_metas = transformExprList_metas(node)
return PartiqlLogical.Expr.List(
values = new_values,
metas = new_metas
)
}
open fun transformExprList_values(node: PartiqlAst.Expr.List) =
node.values.map { transformExpr(it) }
open fun transformExprList_metas(node: PartiqlAst.Expr.List) =
transformMetas(node.metas)
// Variant ExprSexp
open fun transformExprSexp(node: PartiqlAst.Expr.Sexp): PartiqlLogical.Expr {
val new_values = transformExprSexp_values(node)
val new_metas = transformExprSexp_metas(node)
return PartiqlLogical.Expr.Sexp(
values = new_values,
metas = new_metas
)
}
open fun transformExprSexp_values(node: PartiqlAst.Expr.Sexp) =
node.values.map { transformExpr(it) }
open fun transformExprSexp_metas(node: PartiqlAst.Expr.Sexp) =
transformMetas(node.metas)
// Variant ExprDate
open fun transformExprDate(node: PartiqlAst.Expr.Date): PartiqlLogical.Expr {
val new_year = transformExprDate_year(node)
val new_month = transformExprDate_month(node)
val new_day = transformExprDate_day(node)
val new_metas = transformExprDate_metas(node)
return PartiqlLogical.Expr.Date(
year = new_year,
month = new_month,
day = new_day,
metas = new_metas
)
}
open fun transformExprDate_year(node: PartiqlAst.Expr.Date) =
transformLongPrimitive(node.year)
open fun transformExprDate_month(node: PartiqlAst.Expr.Date) =
transformLongPrimitive(node.month)
open fun transformExprDate_day(node: PartiqlAst.Expr.Date) =
transformLongPrimitive(node.day)
open fun transformExprDate_metas(node: PartiqlAst.Expr.Date) =
transformMetas(node.metas)
// Variant ExprLitTime
open fun transformExprLitTime(node: PartiqlAst.Expr.LitTime): PartiqlLogical.Expr {
val new_value = transformExprLitTime_value(node)
val new_metas = transformExprLitTime_metas(node)
return PartiqlLogical.Expr.LitTime(
value = new_value,
metas = new_metas
)
}
open fun transformExprLitTime_value(node: PartiqlAst.Expr.LitTime) =
transformTimeValue(node.value)
open fun transformExprLitTime_metas(node: PartiqlAst.Expr.LitTime) =
transformMetas(node.metas)
// Variant ExprBagOp
open fun transformExprBagOp(node: PartiqlAst.Expr.BagOp): PartiqlLogical.Expr {
val new_op = transformExprBagOp_op(node)
val new_quantifier = transformExprBagOp_quantifier(node)
val new_operands = transformExprBagOp_operands(node)
val new_metas = transformExprBagOp_metas(node)
return PartiqlLogical.Expr.BagOp(
op = new_op,
quantifier = new_quantifier,
operands = new_operands,
metas = new_metas
)
}
open fun transformExprBagOp_op(node: PartiqlAst.Expr.BagOp) =
transformBagOpType(node.op)
open fun transformExprBagOp_quantifier(node: PartiqlAst.Expr.BagOp) =
transformSetQuantifier(node.quantifier)
open fun transformExprBagOp_operands(node: PartiqlAst.Expr.BagOp) =
node.operands.map { transformExpr(it) }
open fun transformExprBagOp_metas(node: PartiqlAst.Expr.BagOp) =
transformMetas(node.metas)
// Variant ExprGraphMatch
open fun transformExprGraphMatch(node: PartiqlAst.Expr.GraphMatch): PartiqlLogical.Expr {
val new_expr = transformExprGraphMatch_expr(node)
val new_gpmlPattern = transformExprGraphMatch_gpmlPattern(node)
val new_metas = transformExprGraphMatch_metas(node)
return PartiqlLogical.Expr.GraphMatch(
expr = new_expr,
gpmlPattern = new_gpmlPattern,
metas = new_metas
)
}
open fun transformExprGraphMatch_expr(node: PartiqlAst.Expr.GraphMatch) =
transformExpr(node.expr)
open fun transformExprGraphMatch_gpmlPattern(node: PartiqlAst.Expr.GraphMatch) =
transformGpmlPattern(node.gpmlPattern)
open fun transformExprGraphMatch_metas(node: PartiqlAst.Expr.GraphMatch) =
transformMetas(node.metas)
// Variant ExprPath
open fun transformExprPath(node: PartiqlAst.Expr.Path): PartiqlLogical.Expr {
val new_root = transformExprPath_root(node)
val new_steps = transformExprPath_steps(node)
val new_metas = transformExprPath_metas(node)
return PartiqlLogical.Expr.Path(
root = new_root,
steps = new_steps,
metas = new_metas
)
}
open fun transformExprPath_root(node: PartiqlAst.Expr.Path) =
transformExpr(node.root)
open fun transformExprPath_steps(node: PartiqlAst.Expr.Path) =
node.steps.map { transformPathStep(it) }
open fun transformExprPath_metas(node: PartiqlAst.Expr.Path) =
transformMetas(node.metas)
// Variant ExprCall
open fun transformExprCall(node: PartiqlAst.Expr.Call): PartiqlLogical.Expr {
val new_funcName = transformExprCall_funcName(node)
val new_args = transformExprCall_args(node)
val new_metas = transformExprCall_metas(node)
return PartiqlLogical.Expr.Call(
funcName = new_funcName,
args = new_args,
metas = new_metas
)
}
open fun transformExprCall_funcName(node: PartiqlAst.Expr.Call) =
transformSymbolPrimitive(node.funcName)
open fun transformExprCall_args(node: PartiqlAst.Expr.Call) =
node.args.map { transformExpr(it) }
open fun transformExprCall_metas(node: PartiqlAst.Expr.Call) =
transformMetas(node.metas)
// Variant ExprCallAgg
abstract fun transformExprCallAgg(node: PartiqlAst.Expr.CallAgg): PartiqlLogical.Expr
// Variant ExprCallWindow
abstract fun transformExprCallWindow(node: PartiqlAst.Expr.CallWindow): PartiqlLogical.Expr
// Variant ExprCast
open fun transformExprCast(node: PartiqlAst.Expr.Cast): PartiqlLogical.Expr {
val new_value = transformExprCast_value(node)
val new_asType = transformExprCast_asType(node)
val new_metas = transformExprCast_metas(node)
return PartiqlLogical.Expr.Cast(
value = new_value,
asType = new_asType,
metas = new_metas
)
}
open fun transformExprCast_value(node: PartiqlAst.Expr.Cast) =
transformExpr(node.value)
open fun transformExprCast_asType(node: PartiqlAst.Expr.Cast) =
transformType(node.asType)
open fun transformExprCast_metas(node: PartiqlAst.Expr.Cast) =
transformMetas(node.metas)
// Variant ExprCanCast
open fun transformExprCanCast(node: PartiqlAst.Expr.CanCast): PartiqlLogical.Expr {
val new_value = transformExprCanCast_value(node)
val new_asType = transformExprCanCast_asType(node)
val new_metas = transformExprCanCast_metas(node)
return PartiqlLogical.Expr.CanCast(
value = new_value,
asType = new_asType,
metas = new_metas
)
}
open fun transformExprCanCast_value(node: PartiqlAst.Expr.CanCast) =
transformExpr(node.value)
open fun transformExprCanCast_asType(node: PartiqlAst.Expr.CanCast) =
transformType(node.asType)
open fun transformExprCanCast_metas(node: PartiqlAst.Expr.CanCast) =
transformMetas(node.metas)
// Variant ExprCanLosslessCast
open fun transformExprCanLosslessCast(node: PartiqlAst.Expr.CanLosslessCast): PartiqlLogical.Expr {
val new_value = transformExprCanLosslessCast_value(node)
val new_asType = transformExprCanLosslessCast_asType(node)
val new_metas = transformExprCanLosslessCast_metas(node)
return PartiqlLogical.Expr.CanLosslessCast(
value = new_value,
asType = new_asType,
metas = new_metas
)
}
open fun transformExprCanLosslessCast_value(node: PartiqlAst.Expr.CanLosslessCast) =
transformExpr(node.value)
open fun transformExprCanLosslessCast_asType(node: PartiqlAst.Expr.CanLosslessCast) =
transformType(node.asType)
open fun transformExprCanLosslessCast_metas(node: PartiqlAst.Expr.CanLosslessCast) =
transformMetas(node.metas)
// Variant ExprNullIf
open fun transformExprNullIf(node: PartiqlAst.Expr.NullIf): PartiqlLogical.Expr {
val new_expr1 = transformExprNullIf_expr1(node)
val new_expr2 = transformExprNullIf_expr2(node)
val new_metas = transformExprNullIf_metas(node)
return PartiqlLogical.Expr.NullIf(
expr1 = new_expr1,
expr2 = new_expr2,
metas = new_metas
)
}
open fun transformExprNullIf_expr1(node: PartiqlAst.Expr.NullIf) =
transformExpr(node.expr1)
open fun transformExprNullIf_expr2(node: PartiqlAst.Expr.NullIf) =
transformExpr(node.expr2)
open fun transformExprNullIf_metas(node: PartiqlAst.Expr.NullIf) =
transformMetas(node.metas)
// Variant ExprCoalesce
open fun transformExprCoalesce(node: PartiqlAst.Expr.Coalesce): PartiqlLogical.Expr {
val new_args = transformExprCoalesce_args(node)
val new_metas = transformExprCoalesce_metas(node)
return PartiqlLogical.Expr.Coalesce(
args = new_args,
metas = new_metas
)
}
open fun transformExprCoalesce_args(node: PartiqlAst.Expr.Coalesce) =
node.args.map { transformExpr(it) }
open fun transformExprCoalesce_metas(node: PartiqlAst.Expr.Coalesce) =
transformMetas(node.metas)
// Variant ExprSelect
abstract fun transformExprSelect(node: PartiqlAst.Expr.Select): PartiqlLogical.Expr
//////////////////////////////////////
// Sum Type: PathStep
//////////////////////////////////////
open fun transformPathStep(node: PartiqlAst.PathStep): PartiqlLogical.PathStep =
when(node) {
is PartiqlAst.PathStep.PathExpr -> transformPathStepPathExpr(node)
is PartiqlAst.PathStep.PathWildcard -> transformPathStepPathWildcard(node)
is PartiqlAst.PathStep.PathUnpivot -> transformPathStepPathUnpivot(node)
}
// Variant PathStepPathExpr
open fun transformPathStepPathExpr(node: PartiqlAst.PathStep.PathExpr): PartiqlLogical.PathStep {
val new_index = transformPathStepPathExpr_index(node)
val new_case = transformPathStepPathExpr_case(node)
val new_metas = transformPathStepPathExpr_metas(node)
return PartiqlLogical.PathStep.PathExpr(
index = new_index,
case = new_case,
metas = new_metas
)
}
open fun transformPathStepPathExpr_index(node: PartiqlAst.PathStep.PathExpr) =
transformExpr(node.index)
open fun transformPathStepPathExpr_case(node: PartiqlAst.PathStep.PathExpr) =
transformCaseSensitivity(node.case)
open fun transformPathStepPathExpr_metas(node: PartiqlAst.PathStep.PathExpr) =
transformMetas(node.metas)
// Variant PathStepPathWildcard
open fun transformPathStepPathWildcard(node: PartiqlAst.PathStep.PathWildcard): PartiqlLogical.PathStep {
val new_metas = transformPathStepPathWildcard_metas(node)
return PartiqlLogical.PathStep.PathWildcard(
metas = new_metas
)
}
open fun transformPathStepPathWildcard_metas(node: PartiqlAst.PathStep.PathWildcard) =
transformMetas(node.metas)
// Variant PathStepPathUnpivot
open fun transformPathStepPathUnpivot(node: PartiqlAst.PathStep.PathUnpivot): PartiqlLogical.PathStep {
val new_metas = transformPathStepPathUnpivot_metas(node)
return PartiqlLogical.PathStep.PathUnpivot(
metas = new_metas
)
}
open fun transformPathStepPathUnpivot_metas(node: PartiqlAst.PathStep.PathUnpivot) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: JoinType
//////////////////////////////////////
open fun transformJoinType(node: PartiqlAst.JoinType): PartiqlLogical.JoinType =
when(node) {
is PartiqlAst.JoinType.Inner -> transformJoinTypeInner(node)
is PartiqlAst.JoinType.Left -> transformJoinTypeLeft(node)
is PartiqlAst.JoinType.Right -> transformJoinTypeRight(node)
is PartiqlAst.JoinType.Full -> transformJoinTypeFull(node)
}
// Variant JoinTypeInner
open fun transformJoinTypeInner(node: PartiqlAst.JoinType.Inner): PartiqlLogical.JoinType {
val new_metas = transformJoinTypeInner_metas(node)
return PartiqlLogical.JoinType.Inner(
metas = new_metas
)
}
open fun transformJoinTypeInner_metas(node: PartiqlAst.JoinType.Inner) =
transformMetas(node.metas)
// Variant JoinTypeLeft
open fun transformJoinTypeLeft(node: PartiqlAst.JoinType.Left): PartiqlLogical.JoinType {
val new_metas = transformJoinTypeLeft_metas(node)
return PartiqlLogical.JoinType.Left(
metas = new_metas
)
}
open fun transformJoinTypeLeft_metas(node: PartiqlAst.JoinType.Left) =
transformMetas(node.metas)
// Variant JoinTypeRight
open fun transformJoinTypeRight(node: PartiqlAst.JoinType.Right): PartiqlLogical.JoinType {
val new_metas = transformJoinTypeRight_metas(node)
return PartiqlLogical.JoinType.Right(
metas = new_metas
)
}
open fun transformJoinTypeRight_metas(node: PartiqlAst.JoinType.Right) =
transformMetas(node.metas)
// Variant JoinTypeFull
open fun transformJoinTypeFull(node: PartiqlAst.JoinType.Full): PartiqlLogical.JoinType {
val new_metas = transformJoinTypeFull_metas(node)
return PartiqlLogical.JoinType.Full(
metas = new_metas
)
}
open fun transformJoinTypeFull_metas(node: PartiqlAst.JoinType.Full) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: GraphMatchDirection
//////////////////////////////////////
open fun transformGraphMatchDirection(node: PartiqlAst.GraphMatchDirection): PartiqlLogical.GraphMatchDirection =
when(node) {
is PartiqlAst.GraphMatchDirection.EdgeLeft -> transformGraphMatchDirectionEdgeLeft(node)
is PartiqlAst.GraphMatchDirection.EdgeUndirected -> transformGraphMatchDirectionEdgeUndirected(node)
is PartiqlAst.GraphMatchDirection.EdgeRight -> transformGraphMatchDirectionEdgeRight(node)
is PartiqlAst.GraphMatchDirection.EdgeLeftOrUndirected -> transformGraphMatchDirectionEdgeLeftOrUndirected(node)
is PartiqlAst.GraphMatchDirection.EdgeUndirectedOrRight -> transformGraphMatchDirectionEdgeUndirectedOrRight(node)
is PartiqlAst.GraphMatchDirection.EdgeLeftOrRight -> transformGraphMatchDirectionEdgeLeftOrRight(node)
is PartiqlAst.GraphMatchDirection.EdgeLeftOrUndirectedOrRight -> transformGraphMatchDirectionEdgeLeftOrUndirectedOrRight(node)
}
// Variant GraphMatchDirectionEdgeLeft
open fun transformGraphMatchDirectionEdgeLeft(node: PartiqlAst.GraphMatchDirection.EdgeLeft): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeLeft_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeLeft(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeLeft_metas(node: PartiqlAst.GraphMatchDirection.EdgeLeft) =
transformMetas(node.metas)
// Variant GraphMatchDirectionEdgeUndirected
open fun transformGraphMatchDirectionEdgeUndirected(node: PartiqlAst.GraphMatchDirection.EdgeUndirected): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeUndirected_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeUndirected(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeUndirected_metas(node: PartiqlAst.GraphMatchDirection.EdgeUndirected) =
transformMetas(node.metas)
// Variant GraphMatchDirectionEdgeRight
open fun transformGraphMatchDirectionEdgeRight(node: PartiqlAst.GraphMatchDirection.EdgeRight): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeRight_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeRight(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeRight_metas(node: PartiqlAst.GraphMatchDirection.EdgeRight) =
transformMetas(node.metas)
// Variant GraphMatchDirectionEdgeLeftOrUndirected
open fun transformGraphMatchDirectionEdgeLeftOrUndirected(node: PartiqlAst.GraphMatchDirection.EdgeLeftOrUndirected): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeLeftOrUndirected_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeLeftOrUndirected(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeLeftOrUndirected_metas(node: PartiqlAst.GraphMatchDirection.EdgeLeftOrUndirected) =
transformMetas(node.metas)
// Variant GraphMatchDirectionEdgeUndirectedOrRight
open fun transformGraphMatchDirectionEdgeUndirectedOrRight(node: PartiqlAst.GraphMatchDirection.EdgeUndirectedOrRight): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeUndirectedOrRight_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeUndirectedOrRight(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeUndirectedOrRight_metas(node: PartiqlAst.GraphMatchDirection.EdgeUndirectedOrRight) =
transformMetas(node.metas)
// Variant GraphMatchDirectionEdgeLeftOrRight
open fun transformGraphMatchDirectionEdgeLeftOrRight(node: PartiqlAst.GraphMatchDirection.EdgeLeftOrRight): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeLeftOrRight_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeLeftOrRight(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeLeftOrRight_metas(node: PartiqlAst.GraphMatchDirection.EdgeLeftOrRight) =
transformMetas(node.metas)
// Variant GraphMatchDirectionEdgeLeftOrUndirectedOrRight
open fun transformGraphMatchDirectionEdgeLeftOrUndirectedOrRight(node: PartiqlAst.GraphMatchDirection.EdgeLeftOrUndirectedOrRight): PartiqlLogical.GraphMatchDirection {
val new_metas = transformGraphMatchDirectionEdgeLeftOrUndirectedOrRight_metas(node)
return PartiqlLogical.GraphMatchDirection.EdgeLeftOrUndirectedOrRight(
metas = new_metas
)
}
open fun transformGraphMatchDirectionEdgeLeftOrUndirectedOrRight_metas(node: PartiqlAst.GraphMatchDirection.EdgeLeftOrUndirectedOrRight) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: GraphMatchPatternPart
//////////////////////////////////////
open fun transformGraphMatchPatternPart(node: PartiqlAst.GraphMatchPatternPart): PartiqlLogical.GraphMatchPatternPart =
when(node) {
is PartiqlAst.GraphMatchPatternPart.Node -> transformGraphMatchPatternPartNode(node)
is PartiqlAst.GraphMatchPatternPart.Edge -> transformGraphMatchPatternPartEdge(node)
is PartiqlAst.GraphMatchPatternPart.Pattern -> transformGraphMatchPatternPartPattern(node)
}
// Variant GraphMatchPatternPartNode
open fun transformGraphMatchPatternPartNode(node: PartiqlAst.GraphMatchPatternPart.Node): PartiqlLogical.GraphMatchPatternPart {
val new_prefilter = transformGraphMatchPatternPartNode_prefilter(node)
val new_variable = transformGraphMatchPatternPartNode_variable(node)
val new_label = transformGraphMatchPatternPartNode_label(node)
val new_metas = transformGraphMatchPatternPartNode_metas(node)
return PartiqlLogical.GraphMatchPatternPart.Node(
prefilter = new_prefilter,
variable = new_variable,
label = new_label,
metas = new_metas
)
}
open fun transformGraphMatchPatternPartNode_prefilter(node: PartiqlAst.GraphMatchPatternPart.Node) =
node.prefilter?.let { transformExpr(it) }
open fun transformGraphMatchPatternPartNode_variable(node: PartiqlAst.GraphMatchPatternPart.Node) =
node.variable?.let { transformSymbolPrimitive(it) }
open fun transformGraphMatchPatternPartNode_label(node: PartiqlAst.GraphMatchPatternPart.Node) =
node.label.map { transformSymbolPrimitive(it) }
open fun transformGraphMatchPatternPartNode_metas(node: PartiqlAst.GraphMatchPatternPart.Node) =
transformMetas(node.metas)
// Variant GraphMatchPatternPartEdge
open fun transformGraphMatchPatternPartEdge(node: PartiqlAst.GraphMatchPatternPart.Edge): PartiqlLogical.GraphMatchPatternPart {
val new_direction = transformGraphMatchPatternPartEdge_direction(node)
val new_quantifier = transformGraphMatchPatternPartEdge_quantifier(node)
val new_prefilter = transformGraphMatchPatternPartEdge_prefilter(node)
val new_variable = transformGraphMatchPatternPartEdge_variable(node)
val new_label = transformGraphMatchPatternPartEdge_label(node)
val new_metas = transformGraphMatchPatternPartEdge_metas(node)
return PartiqlLogical.GraphMatchPatternPart.Edge(
direction = new_direction,
quantifier = new_quantifier,
prefilter = new_prefilter,
variable = new_variable,
label = new_label,
metas = new_metas
)
}
open fun transformGraphMatchPatternPartEdge_direction(node: PartiqlAst.GraphMatchPatternPart.Edge) =
transformGraphMatchDirection(node.direction)
open fun transformGraphMatchPatternPartEdge_quantifier(node: PartiqlAst.GraphMatchPatternPart.Edge) =
node.quantifier?.let { transformGraphMatchQuantifier(it) }
open fun transformGraphMatchPatternPartEdge_prefilter(node: PartiqlAst.GraphMatchPatternPart.Edge) =
node.prefilter?.let { transformExpr(it) }
open fun transformGraphMatchPatternPartEdge_variable(node: PartiqlAst.GraphMatchPatternPart.Edge) =
node.variable?.let { transformSymbolPrimitive(it) }
open fun transformGraphMatchPatternPartEdge_label(node: PartiqlAst.GraphMatchPatternPart.Edge) =
node.label.map { transformSymbolPrimitive(it) }
open fun transformGraphMatchPatternPartEdge_metas(node: PartiqlAst.GraphMatchPatternPart.Edge) =
transformMetas(node.metas)
// Variant GraphMatchPatternPartPattern
open fun transformGraphMatchPatternPartPattern(node: PartiqlAst.GraphMatchPatternPart.Pattern): PartiqlLogical.GraphMatchPatternPart {
val new_pattern = transformGraphMatchPatternPartPattern_pattern(node)
val new_metas = transformGraphMatchPatternPartPattern_metas(node)
return PartiqlLogical.GraphMatchPatternPart.Pattern(
pattern = new_pattern,
metas = new_metas
)
}
open fun transformGraphMatchPatternPartPattern_pattern(node: PartiqlAst.GraphMatchPatternPart.Pattern) =
transformGraphMatchPattern(node.pattern)
open fun transformGraphMatchPatternPartPattern_metas(node: PartiqlAst.GraphMatchPatternPart.Pattern) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: GraphMatchRestrictor
//////////////////////////////////////
open fun transformGraphMatchRestrictor(node: PartiqlAst.GraphMatchRestrictor): PartiqlLogical.GraphMatchRestrictor =
when(node) {
is PartiqlAst.GraphMatchRestrictor.RestrictorTrail -> transformGraphMatchRestrictorRestrictorTrail(node)
is PartiqlAst.GraphMatchRestrictor.RestrictorAcyclic -> transformGraphMatchRestrictorRestrictorAcyclic(node)
is PartiqlAst.GraphMatchRestrictor.RestrictorSimple -> transformGraphMatchRestrictorRestrictorSimple(node)
}
// Variant GraphMatchRestrictorRestrictorTrail
open fun transformGraphMatchRestrictorRestrictorTrail(node: PartiqlAst.GraphMatchRestrictor.RestrictorTrail): PartiqlLogical.GraphMatchRestrictor {
val new_metas = transformGraphMatchRestrictorRestrictorTrail_metas(node)
return PartiqlLogical.GraphMatchRestrictor.RestrictorTrail(
metas = new_metas
)
}
open fun transformGraphMatchRestrictorRestrictorTrail_metas(node: PartiqlAst.GraphMatchRestrictor.RestrictorTrail) =
transformMetas(node.metas)
// Variant GraphMatchRestrictorRestrictorAcyclic
open fun transformGraphMatchRestrictorRestrictorAcyclic(node: PartiqlAst.GraphMatchRestrictor.RestrictorAcyclic): PartiqlLogical.GraphMatchRestrictor {
val new_metas = transformGraphMatchRestrictorRestrictorAcyclic_metas(node)
return PartiqlLogical.GraphMatchRestrictor.RestrictorAcyclic(
metas = new_metas
)
}
open fun transformGraphMatchRestrictorRestrictorAcyclic_metas(node: PartiqlAst.GraphMatchRestrictor.RestrictorAcyclic) =
transformMetas(node.metas)
// Variant GraphMatchRestrictorRestrictorSimple
open fun transformGraphMatchRestrictorRestrictorSimple(node: PartiqlAst.GraphMatchRestrictor.RestrictorSimple): PartiqlLogical.GraphMatchRestrictor {
val new_metas = transformGraphMatchRestrictorRestrictorSimple_metas(node)
return PartiqlLogical.GraphMatchRestrictor.RestrictorSimple(
metas = new_metas
)
}
open fun transformGraphMatchRestrictorRestrictorSimple_metas(node: PartiqlAst.GraphMatchRestrictor.RestrictorSimple) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: GraphMatchSelector
//////////////////////////////////////
open fun transformGraphMatchSelector(node: PartiqlAst.GraphMatchSelector): PartiqlLogical.GraphMatchSelector =
when(node) {
is PartiqlAst.GraphMatchSelector.SelectorAnyShortest -> transformGraphMatchSelectorSelectorAnyShortest(node)
is PartiqlAst.GraphMatchSelector.SelectorAllShortest -> transformGraphMatchSelectorSelectorAllShortest(node)
is PartiqlAst.GraphMatchSelector.SelectorAny -> transformGraphMatchSelectorSelectorAny(node)
is PartiqlAst.GraphMatchSelector.SelectorAnyK -> transformGraphMatchSelectorSelectorAnyK(node)
is PartiqlAst.GraphMatchSelector.SelectorShortestK -> transformGraphMatchSelectorSelectorShortestK(node)
is PartiqlAst.GraphMatchSelector.SelectorShortestKGroup -> transformGraphMatchSelectorSelectorShortestKGroup(node)
}
// Variant GraphMatchSelectorSelectorAnyShortest
open fun transformGraphMatchSelectorSelectorAnyShortest(node: PartiqlAst.GraphMatchSelector.SelectorAnyShortest): PartiqlLogical.GraphMatchSelector {
val new_metas = transformGraphMatchSelectorSelectorAnyShortest_metas(node)
return PartiqlLogical.GraphMatchSelector.SelectorAnyShortest(
metas = new_metas
)
}
open fun transformGraphMatchSelectorSelectorAnyShortest_metas(node: PartiqlAst.GraphMatchSelector.SelectorAnyShortest) =
transformMetas(node.metas)
// Variant GraphMatchSelectorSelectorAllShortest
open fun transformGraphMatchSelectorSelectorAllShortest(node: PartiqlAst.GraphMatchSelector.SelectorAllShortest): PartiqlLogical.GraphMatchSelector {
val new_metas = transformGraphMatchSelectorSelectorAllShortest_metas(node)
return PartiqlLogical.GraphMatchSelector.SelectorAllShortest(
metas = new_metas
)
}
open fun transformGraphMatchSelectorSelectorAllShortest_metas(node: PartiqlAst.GraphMatchSelector.SelectorAllShortest) =
transformMetas(node.metas)
// Variant GraphMatchSelectorSelectorAny
open fun transformGraphMatchSelectorSelectorAny(node: PartiqlAst.GraphMatchSelector.SelectorAny): PartiqlLogical.GraphMatchSelector {
val new_metas = transformGraphMatchSelectorSelectorAny_metas(node)
return PartiqlLogical.GraphMatchSelector.SelectorAny(
metas = new_metas
)
}
open fun transformGraphMatchSelectorSelectorAny_metas(node: PartiqlAst.GraphMatchSelector.SelectorAny) =
transformMetas(node.metas)
// Variant GraphMatchSelectorSelectorAnyK
open fun transformGraphMatchSelectorSelectorAnyK(node: PartiqlAst.GraphMatchSelector.SelectorAnyK): PartiqlLogical.GraphMatchSelector {
val new_k = transformGraphMatchSelectorSelectorAnyK_k(node)
val new_metas = transformGraphMatchSelectorSelectorAnyK_metas(node)
return PartiqlLogical.GraphMatchSelector.SelectorAnyK(
k = new_k,
metas = new_metas
)
}
open fun transformGraphMatchSelectorSelectorAnyK_k(node: PartiqlAst.GraphMatchSelector.SelectorAnyK) =
transformLongPrimitive(node.k)
open fun transformGraphMatchSelectorSelectorAnyK_metas(node: PartiqlAst.GraphMatchSelector.SelectorAnyK) =
transformMetas(node.metas)
// Variant GraphMatchSelectorSelectorShortestK
open fun transformGraphMatchSelectorSelectorShortestK(node: PartiqlAst.GraphMatchSelector.SelectorShortestK): PartiqlLogical.GraphMatchSelector {
val new_k = transformGraphMatchSelectorSelectorShortestK_k(node)
val new_metas = transformGraphMatchSelectorSelectorShortestK_metas(node)
return PartiqlLogical.GraphMatchSelector.SelectorShortestK(
k = new_k,
metas = new_metas
)
}
open fun transformGraphMatchSelectorSelectorShortestK_k(node: PartiqlAst.GraphMatchSelector.SelectorShortestK) =
transformLongPrimitive(node.k)
open fun transformGraphMatchSelectorSelectorShortestK_metas(node: PartiqlAst.GraphMatchSelector.SelectorShortestK) =
transformMetas(node.metas)
// Variant GraphMatchSelectorSelectorShortestKGroup
open fun transformGraphMatchSelectorSelectorShortestKGroup(node: PartiqlAst.GraphMatchSelector.SelectorShortestKGroup): PartiqlLogical.GraphMatchSelector {
val new_k = transformGraphMatchSelectorSelectorShortestKGroup_k(node)
val new_metas = transformGraphMatchSelectorSelectorShortestKGroup_metas(node)
return PartiqlLogical.GraphMatchSelector.SelectorShortestKGroup(
k = new_k,
metas = new_metas
)
}
open fun transformGraphMatchSelectorSelectorShortestKGroup_k(node: PartiqlAst.GraphMatchSelector.SelectorShortestKGroup) =
transformLongPrimitive(node.k)
open fun transformGraphMatchSelectorSelectorShortestKGroup_metas(node: PartiqlAst.GraphMatchSelector.SelectorShortestKGroup) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: GroupingStrategy
//////////////////////////////////////
open fun transformGroupingStrategy(node: PartiqlAst.GroupingStrategy): PartiqlLogical.GroupingStrategy =
when(node) {
is PartiqlAst.GroupingStrategy.GroupFull -> transformGroupingStrategyGroupFull(node)
is PartiqlAst.GroupingStrategy.GroupPartial -> transformGroupingStrategyGroupPartial(node)
}
// Variant GroupingStrategyGroupFull
open fun transformGroupingStrategyGroupFull(node: PartiqlAst.GroupingStrategy.GroupFull): PartiqlLogical.GroupingStrategy {
val new_metas = transformGroupingStrategyGroupFull_metas(node)
return PartiqlLogical.GroupingStrategy.GroupFull(
metas = new_metas
)
}
open fun transformGroupingStrategyGroupFull_metas(node: PartiqlAst.GroupingStrategy.GroupFull) =
transformMetas(node.metas)
// Variant GroupingStrategyGroupPartial
open fun transformGroupingStrategyGroupPartial(node: PartiqlAst.GroupingStrategy.GroupPartial): PartiqlLogical.GroupingStrategy {
val new_metas = transformGroupingStrategyGroupPartial_metas(node)
return PartiqlLogical.GroupingStrategy.GroupPartial(
metas = new_metas
)
}
open fun transformGroupingStrategyGroupPartial_metas(node: PartiqlAst.GroupingStrategy.GroupPartial) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: OrderingSpec
//////////////////////////////////////
open fun transformOrderingSpec(node: PartiqlAst.OrderingSpec): PartiqlLogical.OrderingSpec =
when(node) {
is PartiqlAst.OrderingSpec.Asc -> transformOrderingSpecAsc(node)
is PartiqlAst.OrderingSpec.Desc -> transformOrderingSpecDesc(node)
}
// Variant OrderingSpecAsc
open fun transformOrderingSpecAsc(node: PartiqlAst.OrderingSpec.Asc): PartiqlLogical.OrderingSpec {
val new_metas = transformOrderingSpecAsc_metas(node)
return PartiqlLogical.OrderingSpec.Asc(
metas = new_metas
)
}
open fun transformOrderingSpecAsc_metas(node: PartiqlAst.OrderingSpec.Asc) =
transformMetas(node.metas)
// Variant OrderingSpecDesc
open fun transformOrderingSpecDesc(node: PartiqlAst.OrderingSpec.Desc): PartiqlLogical.OrderingSpec {
val new_metas = transformOrderingSpecDesc_metas(node)
return PartiqlLogical.OrderingSpec.Desc(
metas = new_metas
)
}
open fun transformOrderingSpecDesc_metas(node: PartiqlAst.OrderingSpec.Desc) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: NullsSpec
//////////////////////////////////////
open fun transformNullsSpec(node: PartiqlAst.NullsSpec): PartiqlLogical.NullsSpec =
when(node) {
is PartiqlAst.NullsSpec.NullsFirst -> transformNullsSpecNullsFirst(node)
is PartiqlAst.NullsSpec.NullsLast -> transformNullsSpecNullsLast(node)
}
// Variant NullsSpecNullsFirst
open fun transformNullsSpecNullsFirst(node: PartiqlAst.NullsSpec.NullsFirst): PartiqlLogical.NullsSpec {
val new_metas = transformNullsSpecNullsFirst_metas(node)
return PartiqlLogical.NullsSpec.NullsFirst(
metas = new_metas
)
}
open fun transformNullsSpecNullsFirst_metas(node: PartiqlAst.NullsSpec.NullsFirst) =
transformMetas(node.metas)
// Variant NullsSpecNullsLast
open fun transformNullsSpecNullsLast(node: PartiqlAst.NullsSpec.NullsLast): PartiqlLogical.NullsSpec {
val new_metas = transformNullsSpecNullsLast_metas(node)
return PartiqlLogical.NullsSpec.NullsLast(
metas = new_metas
)
}
open fun transformNullsSpecNullsLast_metas(node: PartiqlAst.NullsSpec.NullsLast) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: CaseSensitivity
//////////////////////////////////////
open fun transformCaseSensitivity(node: PartiqlAst.CaseSensitivity): PartiqlLogical.CaseSensitivity =
when(node) {
is PartiqlAst.CaseSensitivity.CaseSensitive -> transformCaseSensitivityCaseSensitive(node)
is PartiqlAst.CaseSensitivity.CaseInsensitive -> transformCaseSensitivityCaseInsensitive(node)
}
// Variant CaseSensitivityCaseSensitive
open fun transformCaseSensitivityCaseSensitive(node: PartiqlAst.CaseSensitivity.CaseSensitive): PartiqlLogical.CaseSensitivity {
val new_metas = transformCaseSensitivityCaseSensitive_metas(node)
return PartiqlLogical.CaseSensitivity.CaseSensitive(
metas = new_metas
)
}
open fun transformCaseSensitivityCaseSensitive_metas(node: PartiqlAst.CaseSensitivity.CaseSensitive) =
transformMetas(node.metas)
// Variant CaseSensitivityCaseInsensitive
open fun transformCaseSensitivityCaseInsensitive(node: PartiqlAst.CaseSensitivity.CaseInsensitive): PartiqlLogical.CaseSensitivity {
val new_metas = transformCaseSensitivityCaseInsensitive_metas(node)
return PartiqlLogical.CaseSensitivity.CaseInsensitive(
metas = new_metas
)
}
open fun transformCaseSensitivityCaseInsensitive_metas(node: PartiqlAst.CaseSensitivity.CaseInsensitive) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: ScopeQualifier
//////////////////////////////////////
open fun transformScopeQualifier(node: PartiqlAst.ScopeQualifier): PartiqlLogical.ScopeQualifier =
when(node) {
is PartiqlAst.ScopeQualifier.Unqualified -> transformScopeQualifierUnqualified(node)
is PartiqlAst.ScopeQualifier.LocalsFirst -> transformScopeQualifierLocalsFirst(node)
}
// Variant ScopeQualifierUnqualified
open fun transformScopeQualifierUnqualified(node: PartiqlAst.ScopeQualifier.Unqualified): PartiqlLogical.ScopeQualifier {
val new_metas = transformScopeQualifierUnqualified_metas(node)
return PartiqlLogical.ScopeQualifier.Unqualified(
metas = new_metas
)
}
open fun transformScopeQualifierUnqualified_metas(node: PartiqlAst.ScopeQualifier.Unqualified) =
transformMetas(node.metas)
// Variant ScopeQualifierLocalsFirst
open fun transformScopeQualifierLocalsFirst(node: PartiqlAst.ScopeQualifier.LocalsFirst): PartiqlLogical.ScopeQualifier {
val new_metas = transformScopeQualifierLocalsFirst_metas(node)
return PartiqlLogical.ScopeQualifier.LocalsFirst(
metas = new_metas
)
}
open fun transformScopeQualifierLocalsFirst_metas(node: PartiqlAst.ScopeQualifier.LocalsFirst) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: SetQuantifier
//////////////////////////////////////
open fun transformSetQuantifier(node: PartiqlAst.SetQuantifier): PartiqlLogical.SetQuantifier =
when(node) {
is PartiqlAst.SetQuantifier.All -> transformSetQuantifierAll(node)
is PartiqlAst.SetQuantifier.Distinct -> transformSetQuantifierDistinct(node)
}
// Variant SetQuantifierAll
open fun transformSetQuantifierAll(node: PartiqlAst.SetQuantifier.All): PartiqlLogical.SetQuantifier {
val new_metas = transformSetQuantifierAll_metas(node)
return PartiqlLogical.SetQuantifier.All(
metas = new_metas
)
}
open fun transformSetQuantifierAll_metas(node: PartiqlAst.SetQuantifier.All) =
transformMetas(node.metas)
// Variant SetQuantifierDistinct
open fun transformSetQuantifierDistinct(node: PartiqlAst.SetQuantifier.Distinct): PartiqlLogical.SetQuantifier {
val new_metas = transformSetQuantifierDistinct_metas(node)
return PartiqlLogical.SetQuantifier.Distinct(
metas = new_metas
)
}
open fun transformSetQuantifierDistinct_metas(node: PartiqlAst.SetQuantifier.Distinct) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: BagOpType
//////////////////////////////////////
open fun transformBagOpType(node: PartiqlAst.BagOpType): PartiqlLogical.BagOpType =
when(node) {
is PartiqlAst.BagOpType.Union -> transformBagOpTypeUnion(node)
is PartiqlAst.BagOpType.Intersect -> transformBagOpTypeIntersect(node)
is PartiqlAst.BagOpType.Except -> transformBagOpTypeExcept(node)
is PartiqlAst.BagOpType.OuterUnion -> transformBagOpTypeOuterUnion(node)
is PartiqlAst.BagOpType.OuterIntersect -> transformBagOpTypeOuterIntersect(node)
is PartiqlAst.BagOpType.OuterExcept -> transformBagOpTypeOuterExcept(node)
}
// Variant BagOpTypeUnion
open fun transformBagOpTypeUnion(node: PartiqlAst.BagOpType.Union): PartiqlLogical.BagOpType {
val new_metas = transformBagOpTypeUnion_metas(node)
return PartiqlLogical.BagOpType.Union(
metas = new_metas
)
}
open fun transformBagOpTypeUnion_metas(node: PartiqlAst.BagOpType.Union) =
transformMetas(node.metas)
// Variant BagOpTypeIntersect
open fun transformBagOpTypeIntersect(node: PartiqlAst.BagOpType.Intersect): PartiqlLogical.BagOpType {
val new_metas = transformBagOpTypeIntersect_metas(node)
return PartiqlLogical.BagOpType.Intersect(
metas = new_metas
)
}
open fun transformBagOpTypeIntersect_metas(node: PartiqlAst.BagOpType.Intersect) =
transformMetas(node.metas)
// Variant BagOpTypeExcept
open fun transformBagOpTypeExcept(node: PartiqlAst.BagOpType.Except): PartiqlLogical.BagOpType {
val new_metas = transformBagOpTypeExcept_metas(node)
return PartiqlLogical.BagOpType.Except(
metas = new_metas
)
}
open fun transformBagOpTypeExcept_metas(node: PartiqlAst.BagOpType.Except) =
transformMetas(node.metas)
// Variant BagOpTypeOuterUnion
open fun transformBagOpTypeOuterUnion(node: PartiqlAst.BagOpType.OuterUnion): PartiqlLogical.BagOpType {
val new_metas = transformBagOpTypeOuterUnion_metas(node)
return PartiqlLogical.BagOpType.OuterUnion(
metas = new_metas
)
}
open fun transformBagOpTypeOuterUnion_metas(node: PartiqlAst.BagOpType.OuterUnion) =
transformMetas(node.metas)
// Variant BagOpTypeOuterIntersect
open fun transformBagOpTypeOuterIntersect(node: PartiqlAst.BagOpType.OuterIntersect): PartiqlLogical.BagOpType {
val new_metas = transformBagOpTypeOuterIntersect_metas(node)
return PartiqlLogical.BagOpType.OuterIntersect(
metas = new_metas
)
}
open fun transformBagOpTypeOuterIntersect_metas(node: PartiqlAst.BagOpType.OuterIntersect) =
transformMetas(node.metas)
// Variant BagOpTypeOuterExcept
open fun transformBagOpTypeOuterExcept(node: PartiqlAst.BagOpType.OuterExcept): PartiqlLogical.BagOpType {
val new_metas = transformBagOpTypeOuterExcept_metas(node)
return PartiqlLogical.BagOpType.OuterExcept(
metas = new_metas
)
}
open fun transformBagOpTypeOuterExcept_metas(node: PartiqlAst.BagOpType.OuterExcept) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: OnConflictValue
//////////////////////////////////////
open fun transformOnConflictValue(node: PartiqlAst.OnConflictValue): PartiqlLogical.OnConflictValue =
when(node) {
is PartiqlAst.OnConflictValue.Excluded -> transformOnConflictValueExcluded(node)
}
// Variant OnConflictValueExcluded
open fun transformOnConflictValueExcluded(node: PartiqlAst.OnConflictValue.Excluded): PartiqlLogical.OnConflictValue {
val new_metas = transformOnConflictValueExcluded_metas(node)
return PartiqlLogical.OnConflictValue.Excluded(
metas = new_metas
)
}
open fun transformOnConflictValueExcluded_metas(node: PartiqlAst.OnConflictValue.Excluded) =
transformMetas(node.metas)
//////////////////////////////////////
// Sum Type: Type
//////////////////////////////////////
open fun transformType(node: PartiqlAst.Type): PartiqlLogical.Type =
when(node) {
is PartiqlAst.Type.NullType -> transformTypeNullType(node)
is PartiqlAst.Type.BooleanType -> transformTypeBooleanType(node)
is PartiqlAst.Type.SmallintType -> transformTypeSmallintType(node)
is PartiqlAst.Type.Integer4Type -> transformTypeInteger4Type(node)
is PartiqlAst.Type.Integer8Type -> transformTypeInteger8Type(node)
is PartiqlAst.Type.IntegerType -> transformTypeIntegerType(node)
is PartiqlAst.Type.FloatType -> transformTypeFloatType(node)
is PartiqlAst.Type.RealType -> transformTypeRealType(node)
is PartiqlAst.Type.DoublePrecisionType -> transformTypeDoublePrecisionType(node)
is PartiqlAst.Type.DecimalType -> transformTypeDecimalType(node)
is PartiqlAst.Type.NumericType -> transformTypeNumericType(node)
is PartiqlAst.Type.TimestampType -> transformTypeTimestampType(node)
is PartiqlAst.Type.CharacterType -> transformTypeCharacterType(node)
is PartiqlAst.Type.CharacterVaryingType -> transformTypeCharacterVaryingType(node)
is PartiqlAst.Type.MissingType -> transformTypeMissingType(node)
is PartiqlAst.Type.StringType -> transformTypeStringType(node)
is PartiqlAst.Type.SymbolType -> transformTypeSymbolType(node)
is PartiqlAst.Type.BlobType -> transformTypeBlobType(node)
is PartiqlAst.Type.ClobType -> transformTypeClobType(node)
is PartiqlAst.Type.DateType -> transformTypeDateType(node)
is PartiqlAst.Type.TimeType -> transformTypeTimeType(node)
is PartiqlAst.Type.TimeWithTimeZoneType -> transformTypeTimeWithTimeZoneType(node)
is PartiqlAst.Type.StructType -> transformTypeStructType(node)
is PartiqlAst.Type.TupleType -> transformTypeTupleType(node)
is PartiqlAst.Type.ListType -> transformTypeListType(node)
is PartiqlAst.Type.SexpType -> transformTypeSexpType(node)
is PartiqlAst.Type.BagType -> transformTypeBagType(node)
is PartiqlAst.Type.AnyType -> transformTypeAnyType(node)
is PartiqlAst.Type.CustomType -> transformTypeCustomType(node)
}
// Variant TypeNullType
open fun transformTypeNullType(node: PartiqlAst.Type.NullType): PartiqlLogical.Type {
val new_metas = transformTypeNullType_metas(node)
return PartiqlLogical.Type.NullType(
metas = new_metas
)
}
open fun transformTypeNullType_metas(node: PartiqlAst.Type.NullType) =
transformMetas(node.metas)
// Variant TypeBooleanType
open fun transformTypeBooleanType(node: PartiqlAst.Type.BooleanType): PartiqlLogical.Type {
val new_metas = transformTypeBooleanType_metas(node)
return PartiqlLogical.Type.BooleanType(
metas = new_metas
)
}
open fun transformTypeBooleanType_metas(node: PartiqlAst.Type.BooleanType) =
transformMetas(node.metas)
// Variant TypeSmallintType
open fun transformTypeSmallintType(node: PartiqlAst.Type.SmallintType): PartiqlLogical.Type {
val new_metas = transformTypeSmallintType_metas(node)
return PartiqlLogical.Type.SmallintType(
metas = new_metas
)
}
open fun transformTypeSmallintType_metas(node: PartiqlAst.Type.SmallintType) =
transformMetas(node.metas)
// Variant TypeInteger4Type
open fun transformTypeInteger4Type(node: PartiqlAst.Type.Integer4Type): PartiqlLogical.Type {
val new_metas = transformTypeInteger4Type_metas(node)
return PartiqlLogical.Type.Integer4Type(
metas = new_metas
)
}
open fun transformTypeInteger4Type_metas(node: PartiqlAst.Type.Integer4Type) =
transformMetas(node.metas)
// Variant TypeInteger8Type
open fun transformTypeInteger8Type(node: PartiqlAst.Type.Integer8Type): PartiqlLogical.Type {
val new_metas = transformTypeInteger8Type_metas(node)
return PartiqlLogical.Type.Integer8Type(
metas = new_metas
)
}
open fun transformTypeInteger8Type_metas(node: PartiqlAst.Type.Integer8Type) =
transformMetas(node.metas)
// Variant TypeIntegerType
open fun transformTypeIntegerType(node: PartiqlAst.Type.IntegerType): PartiqlLogical.Type {
val new_metas = transformTypeIntegerType_metas(node)
return PartiqlLogical.Type.IntegerType(
metas = new_metas
)
}
open fun transformTypeIntegerType_metas(node: PartiqlAst.Type.IntegerType) =
transformMetas(node.metas)
// Variant TypeFloatType
open fun transformTypeFloatType(node: PartiqlAst.Type.FloatType): PartiqlLogical.Type {
val new_precision = transformTypeFloatType_precision(node)
val new_metas = transformTypeFloatType_metas(node)
return PartiqlLogical.Type.FloatType(
precision = new_precision,
metas = new_metas
)
}
open fun transformTypeFloatType_precision(node: PartiqlAst.Type.FloatType) =
node.precision?.let { transformLongPrimitive(it) }
open fun transformTypeFloatType_metas(node: PartiqlAst.Type.FloatType) =
transformMetas(node.metas)
// Variant TypeRealType
open fun transformTypeRealType(node: PartiqlAst.Type.RealType): PartiqlLogical.Type {
val new_metas = transformTypeRealType_metas(node)
return PartiqlLogical.Type.RealType(
metas = new_metas
)
}
open fun transformTypeRealType_metas(node: PartiqlAst.Type.RealType) =
transformMetas(node.metas)
// Variant TypeDoublePrecisionType
open fun transformTypeDoublePrecisionType(node: PartiqlAst.Type.DoublePrecisionType): PartiqlLogical.Type {
val new_metas = transformTypeDoublePrecisionType_metas(node)
return PartiqlLogical.Type.DoublePrecisionType(
metas = new_metas
)
}
open fun transformTypeDoublePrecisionType_metas(node: PartiqlAst.Type.DoublePrecisionType) =
transformMetas(node.metas)
// Variant TypeDecimalType
open fun transformTypeDecimalType(node: PartiqlAst.Type.DecimalType): PartiqlLogical.Type {
val new_precision = transformTypeDecimalType_precision(node)
val new_scale = transformTypeDecimalType_scale(node)
val new_metas = transformTypeDecimalType_metas(node)
return PartiqlLogical.Type.DecimalType(
precision = new_precision,
scale = new_scale,
metas = new_metas
)
}
open fun transformTypeDecimalType_precision(node: PartiqlAst.Type.DecimalType) =
node.precision?.let { transformLongPrimitive(it) }
open fun transformTypeDecimalType_scale(node: PartiqlAst.Type.DecimalType) =
node.scale?.let { transformLongPrimitive(it) }
open fun transformTypeDecimalType_metas(node: PartiqlAst.Type.DecimalType) =
transformMetas(node.metas)
// Variant TypeNumericType
open fun transformTypeNumericType(node: PartiqlAst.Type.NumericType): PartiqlLogical.Type {
val new_precision = transformTypeNumericType_precision(node)
val new_scale = transformTypeNumericType_scale(node)
val new_metas = transformTypeNumericType_metas(node)
return PartiqlLogical.Type.NumericType(
precision = new_precision,
scale = new_scale,
metas = new_metas
)
}
open fun transformTypeNumericType_precision(node: PartiqlAst.Type.NumericType) =
node.precision?.let { transformLongPrimitive(it) }
open fun transformTypeNumericType_scale(node: PartiqlAst.Type.NumericType) =
node.scale?.let { transformLongPrimitive(it) }
open fun transformTypeNumericType_metas(node: PartiqlAst.Type.NumericType) =
transformMetas(node.metas)
// Variant TypeTimestampType
open fun transformTypeTimestampType(node: PartiqlAst.Type.TimestampType): PartiqlLogical.Type {
val new_metas = transformTypeTimestampType_metas(node)
return PartiqlLogical.Type.TimestampType(
metas = new_metas
)
}
open fun transformTypeTimestampType_metas(node: PartiqlAst.Type.TimestampType) =
transformMetas(node.metas)
// Variant TypeCharacterType
open fun transformTypeCharacterType(node: PartiqlAst.Type.CharacterType): PartiqlLogical.Type {
val new_length = transformTypeCharacterType_length(node)
val new_metas = transformTypeCharacterType_metas(node)
return PartiqlLogical.Type.CharacterType(
length = new_length,
metas = new_metas
)
}
open fun transformTypeCharacterType_length(node: PartiqlAst.Type.CharacterType) =
node.length?.let { transformLongPrimitive(it) }
open fun transformTypeCharacterType_metas(node: PartiqlAst.Type.CharacterType) =
transformMetas(node.metas)
// Variant TypeCharacterVaryingType
open fun transformTypeCharacterVaryingType(node: PartiqlAst.Type.CharacterVaryingType): PartiqlLogical.Type {
val new_length = transformTypeCharacterVaryingType_length(node)
val new_metas = transformTypeCharacterVaryingType_metas(node)
return PartiqlLogical.Type.CharacterVaryingType(
length = new_length,
metas = new_metas
)
}
open fun transformTypeCharacterVaryingType_length(node: PartiqlAst.Type.CharacterVaryingType) =
node.length?.let { transformLongPrimitive(it) }
open fun transformTypeCharacterVaryingType_metas(node: PartiqlAst.Type.CharacterVaryingType) =
transformMetas(node.metas)
// Variant TypeMissingType
open fun transformTypeMissingType(node: PartiqlAst.Type.MissingType): PartiqlLogical.Type {
val new_metas = transformTypeMissingType_metas(node)
return PartiqlLogical.Type.MissingType(
metas = new_metas
)
}
open fun transformTypeMissingType_metas(node: PartiqlAst.Type.MissingType) =
transformMetas(node.metas)
// Variant TypeStringType
open fun transformTypeStringType(node: PartiqlAst.Type.StringType): PartiqlLogical.Type {
val new_metas = transformTypeStringType_metas(node)
return PartiqlLogical.Type.StringType(
metas = new_metas
)
}
open fun transformTypeStringType_metas(node: PartiqlAst.Type.StringType) =
transformMetas(node.metas)
// Variant TypeSymbolType
open fun transformTypeSymbolType(node: PartiqlAst.Type.SymbolType): PartiqlLogical.Type {
val new_metas = transformTypeSymbolType_metas(node)
return PartiqlLogical.Type.SymbolType(
metas = new_metas
)
}
open fun transformTypeSymbolType_metas(node: PartiqlAst.Type.SymbolType) =
transformMetas(node.metas)
// Variant TypeBlobType
open fun transformTypeBlobType(node: PartiqlAst.Type.BlobType): PartiqlLogical.Type {
val new_metas = transformTypeBlobType_metas(node)
return PartiqlLogical.Type.BlobType(
metas = new_metas
)
}
open fun transformTypeBlobType_metas(node: PartiqlAst.Type.BlobType) =
transformMetas(node.metas)
// Variant TypeClobType
open fun transformTypeClobType(node: PartiqlAst.Type.ClobType): PartiqlLogical.Type {
val new_metas = transformTypeClobType_metas(node)
return PartiqlLogical.Type.ClobType(
metas = new_metas
)
}
open fun transformTypeClobType_metas(node: PartiqlAst.Type.ClobType) =
transformMetas(node.metas)
// Variant TypeDateType
open fun transformTypeDateType(node: PartiqlAst.Type.DateType): PartiqlLogical.Type {
val new_metas = transformTypeDateType_metas(node)
return PartiqlLogical.Type.DateType(
metas = new_metas
)
}
open fun transformTypeDateType_metas(node: PartiqlAst.Type.DateType) =
transformMetas(node.metas)
// Variant TypeTimeType
open fun transformTypeTimeType(node: PartiqlAst.Type.TimeType): PartiqlLogical.Type {
val new_precision = transformTypeTimeType_precision(node)
val new_metas = transformTypeTimeType_metas(node)
return PartiqlLogical.Type.TimeType(
precision = new_precision,
metas = new_metas
)
}
open fun transformTypeTimeType_precision(node: PartiqlAst.Type.TimeType) =
node.precision?.let { transformLongPrimitive(it) }
open fun transformTypeTimeType_metas(node: PartiqlAst.Type.TimeType) =
transformMetas(node.metas)
// Variant TypeTimeWithTimeZoneType
open fun transformTypeTimeWithTimeZoneType(node: PartiqlAst.Type.TimeWithTimeZoneType): PartiqlLogical.Type {
val new_precision = transformTypeTimeWithTimeZoneType_precision(node)
val new_metas = transformTypeTimeWithTimeZoneType_metas(node)
return PartiqlLogical.Type.TimeWithTimeZoneType(
precision = new_precision,
metas = new_metas
)
}
open fun transformTypeTimeWithTimeZoneType_precision(node: PartiqlAst.Type.TimeWithTimeZoneType) =
node.precision?.let { transformLongPrimitive(it) }
open fun transformTypeTimeWithTimeZoneType_metas(node: PartiqlAst.Type.TimeWithTimeZoneType) =
transformMetas(node.metas)
// Variant TypeStructType
open fun transformTypeStructType(node: PartiqlAst.Type.StructType): PartiqlLogical.Type {
val new_metas = transformTypeStructType_metas(node)
return PartiqlLogical.Type.StructType(
metas = new_metas
)
}
open fun transformTypeStructType_metas(node: PartiqlAst.Type.StructType) =
transformMetas(node.metas)
// Variant TypeTupleType
open fun transformTypeTupleType(node: PartiqlAst.Type.TupleType): PartiqlLogical.Type {
val new_metas = transformTypeTupleType_metas(node)
return PartiqlLogical.Type.TupleType(
metas = new_metas
)
}
open fun transformTypeTupleType_metas(node: PartiqlAst.Type.TupleType) =
transformMetas(node.metas)
// Variant TypeListType
open fun transformTypeListType(node: PartiqlAst.Type.ListType): PartiqlLogical.Type {
val new_metas = transformTypeListType_metas(node)
return PartiqlLogical.Type.ListType(
metas = new_metas
)
}
open fun transformTypeListType_metas(node: PartiqlAst.Type.ListType) =
transformMetas(node.metas)
// Variant TypeSexpType
open fun transformTypeSexpType(node: PartiqlAst.Type.SexpType): PartiqlLogical.Type {
val new_metas = transformTypeSexpType_metas(node)
return PartiqlLogical.Type.SexpType(
metas = new_metas
)
}
open fun transformTypeSexpType_metas(node: PartiqlAst.Type.SexpType) =
transformMetas(node.metas)
// Variant TypeBagType
open fun transformTypeBagType(node: PartiqlAst.Type.BagType): PartiqlLogical.Type {
val new_metas = transformTypeBagType_metas(node)
return PartiqlLogical.Type.BagType(
metas = new_metas
)
}
open fun transformTypeBagType_metas(node: PartiqlAst.Type.BagType) =
transformMetas(node.metas)
// Variant TypeAnyType
open fun transformTypeAnyType(node: PartiqlAst.Type.AnyType): PartiqlLogical.Type {
val new_metas = transformTypeAnyType_metas(node)
return PartiqlLogical.Type.AnyType(
metas = new_metas
)
}
open fun transformTypeAnyType_metas(node: PartiqlAst.Type.AnyType) =
transformMetas(node.metas)
// Variant TypeCustomType
open fun transformTypeCustomType(node: PartiqlAst.Type.CustomType): PartiqlLogical.Type {
val new_name = transformTypeCustomType_name(node)
val new_metas = transformTypeCustomType_metas(node)
return PartiqlLogical.Type.CustomType(
name = new_name,
metas = new_metas
)
}
open fun transformTypeCustomType_name(node: PartiqlAst.Type.CustomType) =
transformSymbolPrimitive(node.name)
open fun transformTypeCustomType_metas(node: PartiqlAst.Type.CustomType) =
transformMetas(node.metas)
}