Esempio n. 1
0
        /// <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));
        }
Esempio n. 2
0
            protected internal override Node VisitAliasedSqlExpression([NotNull] AliasedSqlExpression node)
            {
                this.Visit(node.Expression);

                if (node.Alias != null)
                {
                    this.Builder.Append($" AS {node.Alias}");
                }

                return(node);
            }
Esempio n. 3
0
        /// <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));
        }
Esempio n. 4
0
 /// <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));
 }
Esempio n. 5
0
 /// <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));
 }