The FROM clause consists of a list of table references.
Inheritance: WSqlFragment
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 4
0
 public virtual void Visit(WFromClause node)
 {
     node.AcceptChildren(this);
 }
Ejemplo n.º 5
0
 public virtual void Visit(WFromClause node)
 {
     node.AcceptChildren(this);
 }
Ejemplo n.º 6
0
 public WSelectQueryBlock()
 {
     FromClause  = new WFromClause();
     WhereClause = new WWhereClause();
 }
Ejemplo n.º 7
0
 public WSelectQueryBlock()
 {
     FromClause = new WFromClause();
     WhereClause = new WWhereClause();
 }