コード例 #1
0
        public static QsiTableNode VisitJoinTableNode(JoinTableNode node)
        {
            var tableNode = new QsiJoinedTableNode
            {
                JoinType = node.Type switch
                {
                    JoinType.Inner => QsiJoinType.Inner,
                    JoinType.Left => QsiJoinType.Left,
                    JoinType.Right => QsiJoinType.Right,
                    JoinType.Full => QsiJoinType.Full,
                    JoinType.Semi => QsiJoinType.Semi,
                    JoinType.Anti => QsiJoinType.Anti,
                    _ => throw new ArgumentOutOfRangeException()
                }
            };

            tableNode.Left.SetValue(VisitTableNode(node.LHS));
            tableNode.Right.SetValue(VisitTableNode(node.RHS));

            // node.OnNode

            PTree.RawNode[tableNode] = node;

            return(tableNode);
        }
コード例 #2
0
        public static QsiTableNode VisitJoinTableNode(JoinTableNode node)
        {
            var tableNode = new QsiJoinedTableNode();

            tableNode.Left.SetValue(VisitTableNode(node.LHS));
            tableNode.Right.SetValue(VisitTableNode(node.RHS));

            if (node.OnNode == null)
            {
                tableNode.IsComma = true;
            }
            else
            {
                tableNode.JoinType = $"{node.Type.ToString().ToUpper()} JOIN";
            }

            PTree.RawNode[tableNode] = node;

            return(tableNode);
        }