Exemplo n.º 1
0
            protected internal override Node VisitJoinSource([NotNull] JoinSource node)
            {
                this.Visit(node.First);

                switch (node.JoinType)
                {
                case JoinType.Cross:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}CROSS JOIN ");
                    break;

                case JoinType.Inner:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}INNER JOIN ");
                    break;

                case JoinType.Left:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}LEFT JOIN ");
                    break;

                case JoinType.NearestInner:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}NEAREST INNER JOIN ");
                    break;

                case JoinType.NearestLeft:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}NEAREST LEFT JOIN ");
                    break;

                case JoinType.SequentialInner:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}SEQUENTIAL INNER JOIN ");
                    break;

                case JoinType.SequentialLeft:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}SEQUENTIAL LEFT JOIN ");
                    break;
                }

                this.Visit(node.Second);

                switch (node.JoinType)
                {
                case JoinType.Left:
                case JoinType.Inner:
                case JoinType.NearestInner:
                case JoinType.NearestLeft:
                    this.Builder.Append($"{this.NewLine()}{this.Indent()}ON ");
                    this.Visit(node.Expression);
                    this.Builder.Append($"{this.UnIndent()}{this.UnIndent()}");
                    break;

                case JoinType.Cross:
                case JoinType.SequentialInner:
                case JoinType.SequentialLeft:
                    this.Builder.Append($"{this.UnIndent()}");
                    break;
                }

                return(node);
            }
 void IVisitor.VisitBefore(JoinSource joinSource)
 {
     this.ParentExists(joinSource);
 }
 void IVisitor.VisitAfter(JoinSource joinSource)
 {
     this.ParentExists(joinSource);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Visits a <see cref="JoinSource"/>.
 /// </summary>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <returns>
 /// The node, or a new version of the node.
 /// </returns>
 protected internal virtual Node VisitJoinSource([NotNull] JoinSource node)
 {
     return(node.VisitChildren(this));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Visits a <see cref="JoinSource"/>.
 /// </summary>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <returns>
 /// The node, or a new version of the node.
 /// </returns>
 protected internal override Node VisitJoinSource(JoinSource node)
 {
     return(this.ValidateChildren(node));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Visits a <see cref="JoinSource"/>.
 /// </summary>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <returns>
 /// The node, or a new version of the node.
 /// </returns>
 protected internal override Node VisitJoinSource(JoinSource node)
 {
     return(this.VisitImplementation(node) ?? base.VisitJoinSource(node));
 }