The FROM clause consists of a list of table references.
Inheritance: WSqlFragment
Example #1
0
        public void Invoke(
            WFromClause fromClause,
            List <WNamedTableReference> vertexTableList,
            List <WTableReferenceWithAlias> nonVertexTableList)
        {
            this.vertexTableList    = vertexTableList;
            this.nonVertexTableList = nonVertexTableList;

            foreach (WTableReference tabRef in fromClause.TableReferences)
            {
                tabRef.Accept(this);
            }
        }
Example #2
0
        internal WFromClause GetFromClause()
        {
            if (TableReferences.Count == 0)
            {
                return(null);
            }

            var newFromClause = new WFromClause();
            //generate tableReference in a reverse way, because the later tableReference may use the column of previous tableReference
            List <WTableReference> reversedTableReference = new List <WTableReference>();

            for (var i = TableReferences.Count - 1; i >= 0; i--)
            {
                reversedTableReference.Add(TableReferences[i].ToTableReference());
            }
            for (var i = reversedTableReference.Count - 1; i >= 0; i--)
            {
                newFromClause.TableReferences.Add(reversedTableReference[i]);
            }
            return(newFromClause);
        }
Example #3
0
        public void Invoke(WFromClause fromClause)
        {
            blocks = new List <AggregationBlock>()
            {
                new AggregationBlock()
            };

            if (fromClause == null)
            {
                return;
            }

            foreach (WTableReference tabRef in fromClause.TableReferences)
            {
                tabRef.Accept(this);
            }
            for (int index = blocks.Count - 1; index >= 1; --index)
            {
                if (blocks[index].RootTableAlias == "dummy" && !blocks[index].TableInputDependency.Any())
                {
                    blocks.RemoveAt(index);
                }
            }
        }
 public virtual void Visit(WFromClause node)
 {
     node.AcceptChildren(this);
 }
 public virtual void Visit(WFromClause node)
 {
     node.AcceptChildren(this);
 }
Example #6
0
 public WSelectQueryBlock()
 {
     FromClause  = new WFromClause();
     WhereClause = new WWhereClause();
 }
Example #7
0
 public WSelectQueryBlock()
 {
     FromClause = new WFromClause();
     WhereClause = new WWhereClause();
 }