Exemplo n.º 1
0
        protected internal override Node VisitBinarySqlExpression(BinarySqlExpression node)
        {
            node = this.ValidateChildren(node);

            this.Data.SetType(node, new TypeDescriptor(BinaryOperator.InferType(this.Data.GetType(node.First).SimplifiedType, node.Op, this.Data.GetType(node.Second).SimplifiedType, error => this.AddError(node, error))));

            if (this.Scope.IsGroupByExpression(node))
            {
                this.Data.SetScope(node, NodeScope.Group);
            }

            return(node);
        }
Exemplo n.º 2
0
            protected internal override Node VisitBinarySqlExpression([NotNull] BinarySqlExpression node)
            {
                this.Builder.Append("(");

                this.Visit(node.First);

                this.Builder.Append($" {node.Op} ");

                this.Visit(node.Second);

                this.Builder.Append(")");

                return(node);
            }
Exemplo n.º 3
0
 /// <summary>
 /// Visits a <see cref="BinarySqlExpression"/> expression.
 /// </summary>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <returns>
 /// The node, or a new version of the node.
 /// </returns>
 protected internal virtual Node VisitBinarySqlExpression([NotNull] BinarySqlExpression node)
 {
     return(node.VisitChildren(this));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Visits a <see cref="BinarySqlExpression"/> expression.
 /// </summary>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <returns>
 /// The node, or a new version of the node.
 /// </returns>
 protected internal override Node VisitBinarySqlExpression(BinarySqlExpression node)
 {
     return(this.CheckForGroups(node, n => base.VisitBinarySqlExpression(n)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Visits a <see cref="BinarySqlExpression"/> expression.
 /// </summary>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <returns>
 /// The node, or a new version of the node.
 /// </returns>
 protected internal override Node VisitBinarySqlExpression(BinarySqlExpression node)
 {
     return(this.VisitImplementation(node) ?? base.VisitBinarySqlExpression(node));
 }