Ejemplo n.º 1
0
        public override IASTNode VisitJoinedTable(MySqlCommandParser.JoinedTableContext ctx)
        {
            JoinedTableSegment result      = new JoinedTableSegment();
            TableFactorSegment tableFactor = (TableFactorSegment)Visit(ctx.tableFactor());

            result.SetTableFactor(tableFactor);
            if (null != ctx.joinSpecification())
            {
                result.SetJoinSpecification((JoinSpecificationSegment)Visit(ctx.joinSpecification()));
            }
            return(result);
        }
Ejemplo n.º 2
0
        private ICollection <SimpleTableSegment> GetTableSegments(Collection <SimpleTableSegment> tableSegments, MySqlCommandParser.JoinedTableContext joinedTable)
        {
            ICollection <SimpleTableSegment> result = new LinkedList <SimpleTableSegment>();

            foreach (SimpleTableSegment tableSegment in ((CollectionValue <SimpleTableSegment>)Visit(joinedTable)).GetValue())
            {
                if (IsTable(tableSegment, tableSegments))
                {
                    result.Add(tableSegment);
                }
            }
            return(result);
        }