Ejemplo n.º 1
0
 public RangeVariable(Table table, int position)
 {
     this.RangeTable       = table;
     this.TableAlias       = null;
     this._emptyData       = this.RangeTable.GetEmptyRowData();
     this.ColumnsInGroupBy = this.RangeTable.GetNewColumnCheckList();
     this.UsedColumns      = this.RangeTable.GetNewColumnCheckList();
     this.RangePosition    = position;
     this.JoinConditions   = new RangeVariableConditions[] { new RangeVariableConditions(this, true) };
     this.WhereConditions  = new RangeVariableConditions[] { new RangeVariableConditions(this, false) };
 }
Ejemplo n.º 2
0
 public RangeVariable(HashMappedList <string, ColumnSchema> variables, bool isVariable)
 {
     this.Variables        = variables;
     this.IsVariable       = isVariable;
     this.RangeTable       = null;
     this.TableAlias       = null;
     this._emptyData       = null;
     this.ColumnsInGroupBy = null;
     this.UsedColumns      = null;
     this.JoinConditions   = new RangeVariableConditions[] { new RangeVariableConditions(this, true) };
     this.WhereConditions  = new RangeVariableConditions[] { new RangeVariableConditions(this, false) };
 }
Ejemplo n.º 3
0
        public RangeVariable(Table table, QNameManager.SimpleName alias, OrderedHashSet <string> columnList, QNameManager.SimpleName[] columnNameList, ParserDQL.CompileContext compileContext)
        {
            this.RangeTable                   = table;
            this.TableAlias                   = alias;
            this._columnAliases               = columnList;
            this._columnAliasNames            = columnNameList;
            this.JoinConditions               = new RangeVariableConditions[] { new RangeVariableConditions(this, true) };
            this.JoinConditions[0].RangeIndex = this.RangeTable.GetPrimaryIndex();
            this.WhereConditions              = new RangeVariableConditions[] { new RangeVariableConditions(this, false) };
            compileContext.RegisterRangeVariable(this);
            SubQuery subQuery = this.RangeTable.GetSubQuery();

            if ((subQuery == null) || subQuery.IsResolved())
            {
                this.SetRangeTableVariables();
            }
        }
Ejemplo n.º 4
0
 public override Expression ReplaceAliasInOrderBy(Expression[] columns, int length)
 {
     for (int i = 0; i < base.nodes.Length; i++)
     {
         if (base.nodes[i] != null)
         {
             base.nodes[i] = base.nodes[i].ReplaceAliasInOrderBy(columns, length);
         }
     }
     if ((base.OpType - 2) <= 1)
     {
         for (int j = 0; j < length; j++)
         {
             QNameManager.SimpleName alias = columns[j].Alias;
             string str = (alias == null) ? null : alias.Name;
             if (((this.schema == null) && (this.TableName == null)) && this.ColumnName.Equals(str))
             {
                 return(columns[j]);
             }
         }
         for (int k = 0; k < length; k++)
         {
             if (columns[k] is ExpressionColumn)
             {
                 if (this.Equals(columns[k]))
                 {
                     return(columns[k]);
                 }
                 if (((this.TableName == null) && (this.schema == null)) && this.ColumnName.Equals(((ExpressionColumn)columns[k]).ColumnName))
                 {
                     return(columns[k]);
                 }
             }
         }
     }
     return(this);
 }
Ejemplo n.º 5
0
 public void SetCursorName(QNameManager.SimpleName name)
 {
     this.cursorName = name;
 }