/// <summary> /// Visits a <see cref="T:ConnectQl.Internal.Ast.Expressions.AliasedSqlExpression" />. /// </summary> /// <param name="node">The node.</param> /// <returns> /// The node, or a new version of the node. /// </returns> protected internal override Node VisitAliasedSqlExpression([NotNull] AliasedSqlExpression node) { if (this.data.GetScope(node.Expression) == NodeScope.Group) { } return(base.VisitAliasedSqlExpression(node)); }
protected internal override Node VisitAliasedSqlExpression([NotNull] AliasedSqlExpression node) { this.Visit(node.Expression); if (node.Alias != null) { this.Builder.Append($" AS {node.Alias}"); } return(node); }
/// <summary> /// Visits a <see cref="AliasedSqlExpression"/>. /// </summary> /// <param name="node"> /// The node. /// </param> /// <returns> /// The node, or a new version of the node. /// </returns> protected internal override Node VisitAliasedSqlExpression(AliasedSqlExpression node) { if (node.Expression is WildcardSqlExpression) { return(this.ValidateChildren(node)); } var alias = this.Scope.AddAlias(node.Alias ?? (node.Expression as FieldReferenceSqlExpression)?.Name); if (node.Alias != alias) { node = this.Data.CopyValues(node, new AliasedSqlExpression(node.Expression, alias)); } return(this.ValidateChildren(node)); }
/// <summary> /// Visits a <see cref="AliasedSqlExpression"/>. /// </summary> /// <param name="node"> /// The node. /// </param> /// <returns> /// The node, or a new version of the node. /// </returns> protected internal virtual Node VisitAliasedSqlExpression([NotNull] AliasedSqlExpression node) { return(node.VisitChildren(this)); }
/// <summary> /// Visits a <see cref="AliasedSqlExpression"/>. /// </summary> /// <param name="node"> /// The node. /// </param> /// <returns> /// The node, or a new version of the node. /// </returns> protected internal override Node VisitAliasedSqlExpression(AliasedSqlExpression node) { return(this.VisitImplementation(node) ?? base.VisitAliasedSqlExpression(node)); }