internal WindowFuncExpr(Identifier serverName , Identifier databaseName , Identifier schemaName , Identifier name , QuantifierType quantifier , bool hasWildcard , Exprs arguments , PartitionBy partitionBy , OrderBy orderBy , Comments comments) { this.Comments = comments; _serverName = serverName; _dataBaseName = databaseName; _schemaName = schemaName; _name = name; _quantifier = quantifier; _hasWildcard = hasWildcard; this.Arguments = arguments; this.PartitionBy = partitionBy; this.OrderBy = orderBy; // if (this.PartitionBy != null) { this.PartitionBy.Parent = this; } if (this.OrderBy != null) { this.OrderBy.Parent = this; } }
public WindowFuncExpr(Identifier serverName , Identifier databaseName , Identifier schemaName , Identifier name , QuantifierType quantifier , PartitionBy partitionBy , OrderBy orderBy) { this.Comments = new Comments(7 + quantifier != QuantifierType.None? 0 : 1); this.ServerName = serverName; this.DataBaseName = databaseName; this.SchemaName = schemaName; this.Name = name; this.Quantifier = quantifier; this.HasWildcard = true; this.Arguments = new Exprs(); this.PartitionBy = partitionBy; this.OrderBy = orderBy; // if (this.PartitionBy != null) { this.PartitionBy.Parent = this; } if (this.OrderBy != null) { this.OrderBy.Parent = this; } }
public WindowFuncExpr(Identifier serverName , Identifier databaseName , Identifier schemaName , Identifier name , Exprs arguments , PartitionBy partitionBy , OrderBy orderBy) { this.Comments = new Comments(6); this.ServerName = serverName; this.DataBaseName = databaseName; this.SchemaName = schemaName; this.Name = name; this.Quantifier = QuantifierType.None; this.HasWildcard = false; this.Arguments = arguments; this.PartitionBy = partitionBy; this.OrderBy = orderBy; // if (this.PartitionBy != null) { this.PartitionBy.Parent = this; } if (this.OrderBy != null) { this.OrderBy.Parent = this; } }
public override void WriteToStream(IndentStream stream) { stream.Write("OVER("); if (PartitionBy != null) { stream.Write(" "); PartitionBy.WriteToStream(stream); } if (OrderBy != null) { stream.Write(" "); OrderBy.WriteToStream(stream); } stream.Write(" )"); }
void IVisitor.VisitBefore(PartitionBy partitionBy) { this.ParentExists(partitionBy); }
void IVisitor.VisitAfter(PartitionBy partitionBy) { this.ParentExists(partitionBy); }
readonly PartitionBy partitionBy; // Can be null public Over(OrderBy orderBy, PartitionBy partitionBy) { this.orderBy = orderBy; this.partitionBy = partitionBy; }
public RowNumberField Partition(SortField field) { PartitionBy.Add(field); return(this); }