From 034cf84296beb7e721a0639e0cc7fb10f008ef47 Mon Sep 17 00:00:00 2001 From: Alan Cai Date: Mon, 9 Dec 2024 16:27:43 -0800 Subject: [PATCH] [v1] Add null defaults to AST factory methods --- partiql-ast/api/partiql-ast.api | 47 +++++++ .../src/main/kotlin/org/partiql/ast/Ast.kt | 116 +++++++++--------- 2 files changed, 105 insertions(+), 58 deletions(-) diff --git a/partiql-ast/api/partiql-ast.api b/partiql-ast/api/partiql-ast.api index cfa712f5c..74e0eae17 100644 --- a/partiql-ast/api/partiql-ast.api +++ b/partiql-ast/api/partiql-ast.api @@ -1,17 +1,25 @@ public final class org/partiql/ast/Ast { public static final field INSTANCE Lorg/partiql/ast/Ast; public static final fun columnConstraintCheck (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/ddl/AttributeConstraint$Check; + public static synthetic fun columnConstraintCheck$default (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/ddl/AttributeConstraint$Check; public static final fun columnConstraintNullable (Lorg/partiql/ast/IdentifierChain;Z)Lorg/partiql/ast/ddl/AttributeConstraint$Null; + public static synthetic fun columnConstraintNullable$default (Lorg/partiql/ast/IdentifierChain;ZILjava/lang/Object;)Lorg/partiql/ast/ddl/AttributeConstraint$Null; public static final fun columnConstraintUnique (Lorg/partiql/ast/IdentifierChain;Z)Lorg/partiql/ast/ddl/AttributeConstraint$Unique; + public static synthetic fun columnConstraintUnique$default (Lorg/partiql/ast/IdentifierChain;ZILjava/lang/Object;)Lorg/partiql/ast/ddl/AttributeConstraint$Unique; public static final fun columnDefinition (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/DataType;ZLjava/util/List;Ljava/lang/String;)Lorg/partiql/ast/ddl/ColumnDefinition; + public static synthetic fun columnDefinition$default (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/DataType;ZLjava/util/List;Ljava/lang/String;ILjava/lang/Object;)Lorg/partiql/ast/ddl/ColumnDefinition; public static final fun conflictTargetConstraint (Lorg/partiql/ast/IdentifierChain;)Lorg/partiql/ast/dml/ConflictTarget$Constraint; public static final fun conflictTargetIndex (Ljava/util/List;)Lorg/partiql/ast/dml/ConflictTarget$Index; public static final fun createTable (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Ljava/util/List;Lorg/partiql/ast/ddl/PartitionBy;Ljava/util/List;)Lorg/partiql/ast/ddl/CreateTable; + public static synthetic fun createTable$default (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Ljava/util/List;Lorg/partiql/ast/ddl/PartitionBy;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/ddl/CreateTable; public static final fun delete (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/dml/Delete; + public static synthetic fun delete$default (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/dml/Delete; public static final fun doNothing ()Lorg/partiql/ast/dml/ConflictAction$DoNothing; public static final fun doReplace (Lorg/partiql/ast/dml/DoReplaceAction;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/dml/ConflictAction$DoReplace; + public static synthetic fun doReplace$default (Lorg/partiql/ast/dml/DoReplaceAction;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/dml/ConflictAction$DoReplace; public static final fun doReplaceActionExcluded ()Lorg/partiql/ast/dml/DoReplaceAction$Excluded; public static final fun doUpdate (Lorg/partiql/ast/dml/DoUpdateAction;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/dml/ConflictAction$DoUpdate; + public static synthetic fun doUpdate$default (Lorg/partiql/ast/dml/DoUpdateAction;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/dml/ConflictAction$DoUpdate; public static final fun doUpdateActionExcluded ()Lorg/partiql/ast/dml/DoUpdateAction$Excluded; public static final fun exclude (Ljava/util/List;)Lorg/partiql/ast/Exclude; public static final fun excludePath (Lorg/partiql/ast/expr/ExprVarRef;Ljava/util/List;)Lorg/partiql/ast/ExcludePath; @@ -25,7 +33,9 @@ public final class org/partiql/ast/Ast { public static final fun exprBag (Ljava/util/List;)Lorg/partiql/ast/expr/ExprBag; public static final fun exprBetween (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Z)Lorg/partiql/ast/expr/ExprBetween; public static final fun exprCall (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Lorg/partiql/ast/SetQuantifier;)Lorg/partiql/ast/expr/ExprCall; + public static synthetic fun exprCall$default (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Lorg/partiql/ast/SetQuantifier;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprCall; public static final fun exprCase (Lorg/partiql/ast/expr/Expr;Ljava/util/List;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprCase; + public static synthetic fun exprCase$default (Lorg/partiql/ast/expr/Expr;Ljava/util/List;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprCase; public static final fun exprCaseBranch (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprCase$Branch; public static final fun exprCast (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/DataType;)Lorg/partiql/ast/expr/ExprCast; public static final fun exprCoalesce (Ljava/util/List;)Lorg/partiql/ast/expr/ExprCoalesce; @@ -33,47 +43,67 @@ public final class org/partiql/ast/Ast { public static final fun exprInCollection (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Z)Lorg/partiql/ast/expr/ExprInCollection; public static final fun exprIsType (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/DataType;Z)Lorg/partiql/ast/expr/ExprIsType; public static final fun exprLike (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Z)Lorg/partiql/ast/expr/ExprLike; + public static synthetic fun exprLike$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;ZILjava/lang/Object;)Lorg/partiql/ast/expr/ExprLike; public static final fun exprLit (Lorg/partiql/ast/Literal;)Lorg/partiql/ast/expr/ExprLit; public static final fun exprMatch (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/graph/GraphMatch;)Lorg/partiql/ast/expr/ExprMatch; public static final fun exprNot (Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprNot; public static final fun exprNullIf (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprNullIf; public static final fun exprOperator (Ljava/lang/String;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprOperator; + public static synthetic fun exprOperator$default (Ljava/lang/String;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprOperator; public static final fun exprOr (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprOr; public static final fun exprOverlay (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprOverlay; + public static synthetic fun exprOverlay$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprOverlay; public static final fun exprParameter (I)Lorg/partiql/ast/expr/ExprParameter; public static final fun exprPath (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/PathStep;)Lorg/partiql/ast/expr/ExprPath; + public static synthetic fun exprPath$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/PathStep;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprPath; public static final fun exprPathStepAllElements (Lorg/partiql/ast/expr/PathStep;)Lorg/partiql/ast/expr/PathStep$AllElements; + public static synthetic fun exprPathStepAllElements$default (Lorg/partiql/ast/expr/PathStep;ILjava/lang/Object;)Lorg/partiql/ast/expr/PathStep$AllElements; public static final fun exprPathStepAllFields (Lorg/partiql/ast/expr/PathStep;)Lorg/partiql/ast/expr/PathStep$AllFields; + public static synthetic fun exprPathStepAllFields$default (Lorg/partiql/ast/expr/PathStep;ILjava/lang/Object;)Lorg/partiql/ast/expr/PathStep$AllFields; public static final fun exprPathStepElement (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/PathStep;)Lorg/partiql/ast/expr/PathStep$Element; + public static synthetic fun exprPathStepElement$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/PathStep;ILjava/lang/Object;)Lorg/partiql/ast/expr/PathStep$Element; public static final fun exprPathStepField (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/expr/PathStep;)Lorg/partiql/ast/expr/PathStep$Field; + public static synthetic fun exprPathStepField$default (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/expr/PathStep;ILjava/lang/Object;)Lorg/partiql/ast/expr/PathStep$Field; public static final fun exprPosition (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprPosition; public static final fun exprQuerySet (Lorg/partiql/ast/QueryBody;Lorg/partiql/ast/OrderBy;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprQuerySet; + public static synthetic fun exprQuerySet$default (Lorg/partiql/ast/QueryBody;Lorg/partiql/ast/OrderBy;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprQuerySet; public static final fun exprRowValue (Ljava/util/List;)Lorg/partiql/ast/expr/ExprRowValue; public static final fun exprRowValue (Ljava/util/List;Z)Lorg/partiql/ast/expr/ExprRowValue; public static final fun exprSessionAttribute (Lorg/partiql/ast/expr/SessionAttribute;)Lorg/partiql/ast/expr/ExprSessionAttribute; public static final fun exprStruct (Ljava/util/List;)Lorg/partiql/ast/expr/ExprStruct; public static final fun exprStructField (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprStruct$Field; public static final fun exprSubstring (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/expr/ExprSubstring; + public static synthetic fun exprSubstring$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprSubstring; public static final fun exprTrim (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/TrimSpec;)Lorg/partiql/ast/expr/ExprTrim; + public static synthetic fun exprTrim$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/TrimSpec;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprTrim; public static final fun exprValues (Ljava/util/List;)Lorg/partiql/ast/expr/ExprValues; public static final fun exprVarRef (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/expr/Scope;)Lorg/partiql/ast/expr/ExprVarRef; public static final fun exprVariant (Ljava/lang/String;Ljava/lang/String;)Lorg/partiql/ast/expr/ExprVariant; public static final fun exprWindow (Lorg/partiql/ast/expr/WindowFunction;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/ExprWindow$Over;)Lorg/partiql/ast/expr/ExprWindow; + public static synthetic fun exprWindow$default (Lorg/partiql/ast/expr/WindowFunction;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/ExprWindow$Over;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprWindow; public static final fun exprWindowOver (Ljava/util/List;Ljava/util/List;)Lorg/partiql/ast/expr/ExprWindow$Over; + public static synthetic fun exprWindowOver$default (Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/expr/ExprWindow$Over; public static final fun from (Ljava/util/List;)Lorg/partiql/ast/From; public static final fun fromExpr (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/FromType;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/FromExpr; + public static synthetic fun fromExpr$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/FromType;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;ILjava/lang/Object;)Lorg/partiql/ast/FromExpr; public static final fun fromJoin (Lorg/partiql/ast/FromTableRef;Lorg/partiql/ast/FromTableRef;Lorg/partiql/ast/JoinType;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/FromJoin; + public static synthetic fun fromJoin$default (Lorg/partiql/ast/FromTableRef;Lorg/partiql/ast/FromTableRef;Lorg/partiql/ast/JoinType;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/FromJoin; public static final fun graphLabelConj (Lorg/partiql/ast/graph/GraphLabel;Lorg/partiql/ast/graph/GraphLabel;)Lorg/partiql/ast/graph/GraphLabel$Conj; public static final fun graphLabelDisj (Lorg/partiql/ast/graph/GraphLabel;Lorg/partiql/ast/graph/GraphLabel;)Lorg/partiql/ast/graph/GraphLabel$Disj; public static final fun graphLabelName (Ljava/lang/String;)Lorg/partiql/ast/graph/GraphLabel$Name; public static final fun graphLabelNegation (Lorg/partiql/ast/graph/GraphLabel;)Lorg/partiql/ast/graph/GraphLabel$Negation; public static final fun graphLabelWildcard ()Lorg/partiql/ast/graph/GraphLabel$Wildcard; public static final fun graphMatch (Ljava/util/List;Lorg/partiql/ast/graph/GraphSelector;)Lorg/partiql/ast/graph/GraphMatch; + public static synthetic fun graphMatch$default (Ljava/util/List;Lorg/partiql/ast/graph/GraphSelector;ILjava/lang/Object;)Lorg/partiql/ast/graph/GraphMatch; public static final fun graphMatchEdge (Lorg/partiql/ast/graph/GraphDirection;Lorg/partiql/ast/graph/GraphQuantifier;Lorg/partiql/ast/expr/Expr;Ljava/lang/String;Lorg/partiql/ast/graph/GraphLabel;)Lorg/partiql/ast/graph/GraphPart$Edge; + public static synthetic fun graphMatchEdge$default (Lorg/partiql/ast/graph/GraphDirection;Lorg/partiql/ast/graph/GraphQuantifier;Lorg/partiql/ast/expr/Expr;Ljava/lang/String;Lorg/partiql/ast/graph/GraphLabel;ILjava/lang/Object;)Lorg/partiql/ast/graph/GraphPart$Edge; public static final fun graphMatchNode (Lorg/partiql/ast/expr/Expr;Ljava/lang/String;Lorg/partiql/ast/graph/GraphLabel;)Lorg/partiql/ast/graph/GraphPart$Node; + public static synthetic fun graphMatchNode$default (Lorg/partiql/ast/expr/Expr;Ljava/lang/String;Lorg/partiql/ast/graph/GraphLabel;ILjava/lang/Object;)Lorg/partiql/ast/graph/GraphPart$Node; public static final fun graphMatchPattern (Lorg/partiql/ast/graph/GraphPattern;)Lorg/partiql/ast/graph/GraphPart$Pattern; public static final fun graphPattern (Lorg/partiql/ast/graph/GraphRestrictor;Lorg/partiql/ast/expr/Expr;Ljava/lang/String;Lorg/partiql/ast/graph/GraphQuantifier;Ljava/util/List;)Lorg/partiql/ast/graph/GraphPattern; + public static synthetic fun graphPattern$default (Lorg/partiql/ast/graph/GraphRestrictor;Lorg/partiql/ast/expr/Expr;Ljava/lang/String;Lorg/partiql/ast/graph/GraphQuantifier;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/graph/GraphPattern; public static final fun graphQuantifier (JLjava/lang/Long;)Lorg/partiql/ast/graph/GraphQuantifier; + public static synthetic fun graphQuantifier$default (JLjava/lang/Long;ILjava/lang/Object;)Lorg/partiql/ast/graph/GraphQuantifier; public static final fun graphSelectorAllShortest ()Lorg/partiql/ast/graph/GraphSelector$AllShortest; public static final fun graphSelectorAny ()Lorg/partiql/ast/graph/GraphSelector$Any; public static final fun graphSelectorAnyK (J)Lorg/partiql/ast/graph/GraphSelector$AnyK; @@ -81,38 +111,55 @@ public final class org/partiql/ast/Ast { public static final fun graphSelectorShortestK (J)Lorg/partiql/ast/graph/GraphSelector$ShortestK; public static final fun graphSelectorShortestKGroup (J)Lorg/partiql/ast/graph/GraphSelector$ShortestKGroup; public static final fun groupBy (Lorg/partiql/ast/GroupByStrategy;Ljava/util/List;Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/GroupBy; + public static synthetic fun groupBy$default (Lorg/partiql/ast/GroupByStrategy;Ljava/util/List;Lorg/partiql/ast/Identifier;ILjava/lang/Object;)Lorg/partiql/ast/GroupBy; public static final fun groupByKey (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/GroupBy$Key; + public static synthetic fun groupByKey$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;ILjava/lang/Object;)Lorg/partiql/ast/GroupBy$Key; public static final fun identifier (Ljava/lang/String;Z)Lorg/partiql/ast/Identifier; public static final fun identifierChain (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/IdentifierChain;)Lorg/partiql/ast/IdentifierChain; + public static synthetic fun identifierChain$default (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/IdentifierChain;ILjava/lang/Object;)Lorg/partiql/ast/IdentifierChain; public static final fun insert (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/dml/InsertSource;Lorg/partiql/ast/dml/OnConflict;)Lorg/partiql/ast/dml/Insert; + public static synthetic fun insert$default (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/dml/InsertSource;Lorg/partiql/ast/dml/OnConflict;ILjava/lang/Object;)Lorg/partiql/ast/dml/Insert; public static final fun insertSourceDefault ()Lorg/partiql/ast/dml/InsertSource$FromDefault; public static final fun insertSourceExpr (Ljava/util/List;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/dml/InsertSource$FromExpr; + public static synthetic fun insertSourceExpr$default (Ljava/util/List;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/dml/InsertSource$FromExpr; public static final fun keyValue (Ljava/lang/String;Ljava/lang/String;)Lorg/partiql/ast/ddl/KeyValue; public static final fun let (Ljava/util/List;)Lorg/partiql/ast/Let; public static final fun letBinding (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/Let$Binding; public static final fun onConflict (Lorg/partiql/ast/dml/ConflictAction;Lorg/partiql/ast/dml/ConflictTarget;)Lorg/partiql/ast/dml/OnConflict; + public static synthetic fun onConflict$default (Lorg/partiql/ast/dml/ConflictAction;Lorg/partiql/ast/dml/ConflictTarget;ILjava/lang/Object;)Lorg/partiql/ast/dml/OnConflict; public static final fun orderBy (Ljava/util/List;)Lorg/partiql/ast/OrderBy; public static final fun partitionBy (Ljava/util/List;)Lorg/partiql/ast/ddl/PartitionBy; public static final fun query (Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/Query; public static final fun queryBodySFW (Lorg/partiql/ast/Select;Lorg/partiql/ast/Exclude;Lorg/partiql/ast/From;Lorg/partiql/ast/Let;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/GroupBy;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/QueryBody$SFW; + public static synthetic fun queryBodySFW$default (Lorg/partiql/ast/Select;Lorg/partiql/ast/Exclude;Lorg/partiql/ast/From;Lorg/partiql/ast/Let;Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/GroupBy;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/QueryBody$SFW; public static final fun queryBodySetOp (Lorg/partiql/ast/SetOp;ZLorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/QueryBody$SetOp; public static final fun replace (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/dml/InsertSource;)Lorg/partiql/ast/dml/Replace; + public static synthetic fun replace$default (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/dml/InsertSource;ILjava/lang/Object;)Lorg/partiql/ast/dml/Replace; public static final fun selectItemExpr (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/SelectItem$Expr; + public static synthetic fun selectItemExpr$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Identifier;ILjava/lang/Object;)Lorg/partiql/ast/SelectItem$Expr; public static final fun selectItemStar (Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/SelectItem$Star; public static final fun selectList (Ljava/util/List;Lorg/partiql/ast/SetQuantifier;)Lorg/partiql/ast/SelectList; + public static synthetic fun selectList$default (Ljava/util/List;Lorg/partiql/ast/SetQuantifier;ILjava/lang/Object;)Lorg/partiql/ast/SelectList; public static final fun selectPivot (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/SelectPivot; public static final fun selectStar (Lorg/partiql/ast/SetQuantifier;)Lorg/partiql/ast/SelectStar; + public static synthetic fun selectStar$default (Lorg/partiql/ast/SetQuantifier;ILjava/lang/Object;)Lorg/partiql/ast/SelectStar; public static final fun selectValue (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/SetQuantifier;)Lorg/partiql/ast/SelectValue; + public static synthetic fun selectValue$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/SetQuantifier;ILjava/lang/Object;)Lorg/partiql/ast/SelectValue; public static final fun setClause (Lorg/partiql/ast/dml/UpdateTarget;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/dml/SetClause; public static final fun setOp (Lorg/partiql/ast/SetOpType;Lorg/partiql/ast/SetQuantifier;)Lorg/partiql/ast/SetOp; + public static synthetic fun setOp$default (Lorg/partiql/ast/SetOpType;Lorg/partiql/ast/SetQuantifier;ILjava/lang/Object;)Lorg/partiql/ast/SetOp; public static final fun sort (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Order;Lorg/partiql/ast/Nulls;)Lorg/partiql/ast/Sort; + public static synthetic fun sort$default (Lorg/partiql/ast/expr/Expr;Lorg/partiql/ast/Order;Lorg/partiql/ast/Nulls;ILjava/lang/Object;)Lorg/partiql/ast/Sort; public static final fun tableConstraintUnique (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Z)Lorg/partiql/ast/ddl/TableConstraint$Unique; + public static synthetic fun tableConstraintUnique$default (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;ZILjava/lang/Object;)Lorg/partiql/ast/ddl/TableConstraint$Unique; public static final fun update (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Lorg/partiql/ast/expr/Expr;)Lorg/partiql/ast/dml/Update; + public static synthetic fun update$default (Lorg/partiql/ast/IdentifierChain;Ljava/util/List;Lorg/partiql/ast/expr/Expr;ILjava/lang/Object;)Lorg/partiql/ast/dml/Update; public static final fun updateTarget (Lorg/partiql/ast/Identifier;Ljava/util/List;)Lorg/partiql/ast/dml/UpdateTarget; public static final fun updateTargetStepElement (I)Lorg/partiql/ast/dml/UpdateTargetStep$Element; public static final fun updateTargetStepElement (Ljava/lang/String;)Lorg/partiql/ast/dml/UpdateTargetStep$Element; public static final fun updateTargetStepField (Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/dml/UpdateTargetStep$Field; public static final fun upsert (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/dml/InsertSource;)Lorg/partiql/ast/dml/Upsert; + public static synthetic fun upsert$default (Lorg/partiql/ast/IdentifierChain;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/dml/InsertSource;ILjava/lang/Object;)Lorg/partiql/ast/dml/Upsert; } public abstract class org/partiql/ast/AstEnum : org/partiql/ast/AstNode { diff --git a/partiql-ast/src/main/kotlin/org/partiql/ast/Ast.kt b/partiql-ast/src/main/kotlin/org/partiql/ast/Ast.kt index b11360b42..a9d66f2b5 100644 --- a/partiql-ast/src/main/kotlin/org/partiql/ast/Ast.kt +++ b/partiql-ast/src/main/kotlin/org/partiql/ast/Ast.kt @@ -94,12 +94,12 @@ public object Ast { } @JvmStatic - public fun exprCall(function: IdentifierChain, args: List, setq: SetQuantifier?): ExprCall { + public fun exprCall(function: IdentifierChain, args: List, setq: SetQuantifier? = null): ExprCall { return ExprCall(function, args, setq) } @JvmStatic - public fun exprCase(expr: Expr?, branches: List, defaultExpr: Expr?): ExprCase { + public fun exprCase(expr: Expr? = null, branches: List, defaultExpr: Expr? = null): ExprCase { return ExprCase(expr, branches, defaultExpr) } @@ -134,7 +134,7 @@ public object Ast { } @JvmStatic - public fun exprLike(value: Expr, pattern: Expr, escape: Expr?, not: Boolean): ExprLike { + public fun exprLike(value: Expr, pattern: Expr, escape: Expr? = null, not: Boolean): ExprLike { return ExprLike(value, pattern, escape, not) } @@ -159,7 +159,7 @@ public object Ast { } @JvmStatic - public fun exprOperator(symbol: String, lhs: Expr?, rhs: Expr): ExprOperator { + public fun exprOperator(symbol: String, lhs: Expr? = null, rhs: Expr): ExprOperator { return ExprOperator(symbol, lhs, rhs) } @@ -169,7 +169,7 @@ public object Ast { } @JvmStatic - public fun exprOverlay(value: Expr, placing: Expr, from: Expr, forLength: Expr?): ExprOverlay { + public fun exprOverlay(value: Expr, placing: Expr, from: Expr, forLength: Expr? = null): ExprOverlay { return ExprOverlay(value, placing, from, forLength) } @@ -179,7 +179,7 @@ public object Ast { } @JvmStatic - public fun exprPath(root: Expr, next: PathStep?): ExprPath { + public fun exprPath(root: Expr, next: PathStep? = null): ExprPath { return ExprPath(root, next) } @@ -189,7 +189,7 @@ public object Ast { } @JvmStatic - public fun exprQuerySet(body: QueryBody, orderBy: OrderBy?, limit: Expr?, offset: Expr?): ExprQuerySet { + public fun exprQuerySet(body: QueryBody, orderBy: OrderBy? = null, limit: Expr? = null, offset: Expr? = null): ExprQuerySet { return ExprQuerySet(body, orderBy, limit, offset) } @@ -209,12 +209,12 @@ public object Ast { } @JvmStatic - public fun exprSubstring(value: Expr, start: Expr?, length: Expr?): ExprSubstring { + public fun exprSubstring(value: Expr, start: Expr? = null, length: Expr? = null): ExprSubstring { return ExprSubstring(value, start, length) } @JvmStatic - public fun exprTrim(value: Expr, chars: Expr?, trimSpec: TrimSpec?): ExprTrim { + public fun exprTrim(value: Expr, chars: Expr? = null, trimSpec: TrimSpec? = null): ExprTrim { return ExprTrim(value, chars, trimSpec) } @@ -248,35 +248,35 @@ public object Ast { public fun exprWindow( windowFunction: WindowFunction, exression: Expr, - offset: Expr?, - defaultValue: Expr?, + offset: Expr? = null, + defaultValue: Expr? = null, over: ExprWindow.Over ): ExprWindow { return ExprWindow(windowFunction, exression, offset, defaultValue, over) } @JvmStatic - public fun exprWindowOver(partitions: List?, sorts: List?): ExprWindow.Over { + public fun exprWindowOver(partitions: List? = null, sorts: List? = null): ExprWindow.Over { return ExprWindow.Over(partitions, sorts) } @JvmStatic - public fun exprPathStepField(value: Identifier, next: PathStep?): PathStep.Field { + public fun exprPathStepField(value: Identifier, next: PathStep? = null): PathStep.Field { return PathStep.Field(value, next) } @JvmStatic - public fun exprPathStepElement(element: Expr, next: PathStep?): PathStep.Element { + public fun exprPathStepElement(element: Expr, next: PathStep? = null): PathStep.Element { return PathStep.Element(element, next) } @JvmStatic - public fun exprPathStepAllElements(next: PathStep?): PathStep.AllElements { + public fun exprPathStepAllElements(next: PathStep? = null): PathStep.AllElements { return PathStep.AllElements(next) } @JvmStatic - public fun exprPathStepAllFields(next: PathStep?): AllFields { + public fun exprPathStepAllFields(next: PathStep? = null): AllFields { return AllFields(next) } @@ -307,22 +307,22 @@ public object Ast { } @JvmStatic - public fun graphMatch(patterns: List, selector: GraphSelector?): GraphMatch { + public fun graphMatch(patterns: List, selector: GraphSelector? = null): GraphMatch { return GraphMatch(patterns, selector) } @JvmStatic - public fun graphMatchNode(prefilter: Expr?, variable: String?, label: GraphLabel?): GraphPart.Node { + public fun graphMatchNode(prefilter: Expr? = null, variable: String? = null, label: GraphLabel? = null): GraphPart.Node { return GraphPart.Node(prefilter, variable, label) } @JvmStatic public fun graphMatchEdge( direction: GraphDirection, - quantifier: GraphQuantifier?, - prefilter: Expr?, - variable: String?, - label: GraphLabel? + quantifier: GraphQuantifier? = null, + prefilter: Expr? = null, + variable: String? = null, + label: GraphLabel? = null ): GraphPart.Edge { return GraphPart.Edge(direction, quantifier, prefilter, variable, label) } @@ -334,17 +334,17 @@ public object Ast { @JvmStatic public fun graphPattern( - restrictor: GraphRestrictor?, - prefilter: Expr?, - variable: String?, - quantifier: GraphQuantifier?, + restrictor: GraphRestrictor? = null, + prefilter: Expr? = null, + variable: String? = null, + quantifier: GraphQuantifier? = null, parts: List ): GraphPattern { return GraphPattern(restrictor, prefilter, variable, quantifier, parts) } @JvmStatic - public fun graphQuantifier(lower: Long, upper: Long?): GraphQuantifier { + public fun graphQuantifier(lower: Long, upper: Long? = null): GraphQuantifier { return GraphQuantifier(lower, upper) } @@ -420,22 +420,22 @@ public object Ast { } @JvmStatic - public fun fromExpr(expr: Expr, fromType: FromType, asAlias: Identifier?, atAlias: Identifier?): FromExpr { + public fun fromExpr(expr: Expr, fromType: FromType, asAlias: Identifier? = null, atAlias: Identifier? = null): FromExpr { return FromExpr(expr, fromType, asAlias, atAlias) } @JvmStatic - public fun fromJoin(lhs: FromTableRef, rhs: FromTableRef, joinType: JoinType?, condition: Expr?): FromJoin { + public fun fromJoin(lhs: FromTableRef, rhs: FromTableRef, joinType: JoinType? = null, condition: Expr? = null): FromJoin { return FromJoin(lhs, rhs, joinType, condition) } @JvmStatic - public fun groupBy(strategy: GroupByStrategy, keys: List, asAlias: Identifier?): GroupBy { + public fun groupBy(strategy: GroupByStrategy, keys: List, asAlias: Identifier? = null): GroupBy { return GroupBy(strategy, keys, asAlias) } @JvmStatic - public fun groupByKey(expr: Expr, asAlias: Identifier?): GroupBy.Key { + public fun groupByKey(expr: Expr, asAlias: Identifier? = null): GroupBy.Key { return GroupBy.Key(expr, asAlias) } @@ -445,7 +445,7 @@ public object Ast { } @JvmStatic - public fun identifierChain(root: Identifier, next: IdentifierChain?): IdentifierChain { + public fun identifierChain(root: Identifier, next: IdentifierChain? = null): IdentifierChain { return IdentifierChain(root, next) } @@ -470,27 +470,27 @@ public object Ast { } @JvmStatic - public fun insert(tableName: IdentifierChain, asAlias: Identifier?, source: InsertSource, onConflict: OnConflict?): Insert { + public fun insert(tableName: IdentifierChain, asAlias: Identifier? = null, source: InsertSource, onConflict: OnConflict? = null): Insert { return Insert(tableName, asAlias, source, onConflict) } @JvmStatic - public fun upsert(tableName: IdentifierChain, asAlias: Identifier?, source: InsertSource): Upsert { + public fun upsert(tableName: IdentifierChain, asAlias: Identifier? = null, source: InsertSource): Upsert { return Upsert(tableName, asAlias, source) } @JvmStatic - public fun replace(tableName: IdentifierChain, asAlias: Identifier?, source: InsertSource): Replace { + public fun replace(tableName: IdentifierChain, asAlias: Identifier? = null, source: InsertSource): Replace { return Replace(tableName, asAlias, source) } @JvmStatic - public fun update(tableName: IdentifierChain, setClauses: List, condition: Expr?): Update { + public fun update(tableName: IdentifierChain, setClauses: List, condition: Expr? = null): Update { return Update(tableName, setClauses, condition) } @JvmStatic - public fun delete(tableName: IdentifierChain, condition: Expr?): Delete { + public fun delete(tableName: IdentifierChain, condition: Expr? = null): Delete { return Delete(tableName, condition) } @@ -500,7 +500,7 @@ public object Ast { } @JvmStatic - public fun insertSourceExpr(columns: List?, expr: Expr): InsertSource.FromExpr { + public fun insertSourceExpr(columns: List? = null, expr: Expr): InsertSource.FromExpr { return InsertSource.FromExpr(columns, expr) } @@ -510,7 +510,7 @@ public object Ast { } @JvmStatic - public fun onConflict(action: ConflictAction, target: ConflictTarget?): OnConflict { + public fun onConflict(action: ConflictAction, target: ConflictTarget? = null): OnConflict { return OnConflict(action, target) } @@ -530,12 +530,12 @@ public object Ast { } @JvmStatic - public fun doReplace(action: DoReplaceAction, condition: Expr?): ConflictAction.DoReplace { + public fun doReplace(action: DoReplaceAction, condition: Expr? = null): ConflictAction.DoReplace { return ConflictAction.DoReplace(action, condition) } @JvmStatic - public fun doUpdate(action: DoUpdateAction, condition: Expr?): ConflictAction.DoUpdate { + public fun doUpdate(action: DoUpdateAction, condition: Expr? = null): ConflictAction.DoUpdate { return ConflictAction.DoUpdate(action, condition) } @@ -572,12 +572,12 @@ public object Ast { @JvmStatic public fun queryBodySFW( select: Select, - exclude: Exclude?, + exclude: Exclude? = null, from: From, - let: Let?, - where: Expr?, - groupBy: GroupBy?, - having: Expr? + let: Let? = null, + where: Expr? = null, + groupBy: GroupBy? = null, + having: Expr? = null ): QueryBody.SFW { return QueryBody.SFW(select, exclude, from, let, where, groupBy, having) } @@ -593,12 +593,12 @@ public object Ast { } @JvmStatic - public fun selectItemExpr(expr: Expr, asAlias: Identifier?): SelectItem.Expr { + public fun selectItemExpr(expr: Expr, asAlias: Identifier? = null): SelectItem.Expr { return SelectItem.Expr(expr, asAlias) } @JvmStatic - public fun selectList(items: List, setq: SetQuantifier?): SelectList { + public fun selectList(items: List, setq: SetQuantifier? = null): SelectList { return SelectList(items, setq) } @@ -608,22 +608,22 @@ public object Ast { } @JvmStatic - public fun selectStar(setq: SetQuantifier?): SelectStar { + public fun selectStar(setq: SetQuantifier? = null): SelectStar { return SelectStar(setq) } @JvmStatic - public fun selectValue(constructor: Expr, setq: SetQuantifier?): SelectValue { + public fun selectValue(constructor: Expr, setq: SetQuantifier? = null): SelectValue { return SelectValue(constructor, setq) } @JvmStatic - public fun setOp(setOpType: SetOpType, setq: SetQuantifier?): SetOp { + public fun setOp(setOpType: SetOpType, setq: SetQuantifier? = null): SetOp { return SetOp(setOpType, setq) } @JvmStatic - public fun sort(expr: Expr, order: Order?, nulls: Nulls?): Sort { + public fun sort(expr: Expr, order: Order? = null, nulls: Nulls? = null): Sort { return Sort(expr, order, nulls) } @@ -631,7 +631,7 @@ public object Ast { // DDL // @JvmStatic - public fun createTable(name: IdentifierChain, columns: List, constraints: List, partitionBy: PartitionBy?, tableProperties: List): CreateTable { + public fun createTable(name: IdentifierChain, columns: List, constraints: List, partitionBy: PartitionBy? = null, tableProperties: List): CreateTable { return CreateTable( name, columns, @@ -642,27 +642,27 @@ public object Ast { } @JvmStatic - public fun columnDefinition(name: Identifier, type: DataType, isOptional: Boolean, constraints: List, comment: String?): ColumnDefinition { + public fun columnDefinition(name: Identifier, type: DataType, isOptional: Boolean, constraints: List, comment: String? = null): ColumnDefinition { return ColumnDefinition(name, type, isOptional, constraints, comment) } @JvmStatic - public fun tableConstraintUnique(name: IdentifierChain?, columns: List, isPrimaryKey: Boolean): TableConstraint.Unique { + public fun tableConstraintUnique(name: IdentifierChain? = null, columns: List, isPrimaryKey: Boolean): TableConstraint.Unique { return TableConstraint.Unique(name, columns, isPrimaryKey) } @JvmStatic - public fun columnConstraintNullable(name: IdentifierChain?, isNullable: Boolean): AttributeConstraint.Null { + public fun columnConstraintNullable(name: IdentifierChain? = null, isNullable: Boolean): AttributeConstraint.Null { return AttributeConstraint.Null(name, isNullable) } @JvmStatic - public fun columnConstraintUnique(name: IdentifierChain?, isPrimaryKey: Boolean): AttributeConstraint.Unique { + public fun columnConstraintUnique(name: IdentifierChain? = null, isPrimaryKey: Boolean): AttributeConstraint.Unique { return AttributeConstraint.Unique(name, isPrimaryKey) } @JvmStatic - public fun columnConstraintCheck(name: IdentifierChain?, searchCondition: Expr): AttributeConstraint.Check { + public fun columnConstraintCheck(name: IdentifierChain? = null, searchCondition: Expr): AttributeConstraint.Check { return AttributeConstraint.Check(name, searchCondition) }