Example #1
0
 private void SetTables()
 {
     if (((this.Tables.Length != 0) || (base.Parent != null)) || (base.Root.ScopeTables != null))
     {
         HashMappedList <string, Table> list = new HashMappedList <string, Table>();
         if ((base.Parent == null) && (base.Root.ScopeTables != null))
         {
             for (int j = 0; j < base.Root.ScopeTables.Size(); j++)
             {
                 list.Add(base.Root.ScopeTables.GetKey(j), base.Root.ScopeTables.Get(j));
             }
         }
         else if ((base.Parent != null) && (base.Parent.ScopeTables != null))
         {
             for (int j = 0; j < base.Parent.ScopeTables.Size(); j++)
             {
                 list.Add(base.Parent.ScopeTables.GetKey(j), base.Parent.ScopeTables.Get(j));
             }
         }
         for (int i = 0; i < this.Tables.Length; i++)
         {
             string name = this.Tables[i].GetName().Name;
             if (!list.Add(name, this.Tables[i]))
             {
                 throw Error.GetError(0x15e6, name);
             }
         }
         this.ScopeTables = list;
     }
 }
Example #2
0
 private void SetVariables()
 {
     if (this.Variables.Length == 0)
     {
         this.RangeVariables = (base.Parent == null) ? base.Root.GetParameterRangeVariables() : base.Parent.RangeVariables;
     }
     else
     {
         HashMappedList <string, ColumnSchema> variables = new HashMappedList <string, ColumnSchema>();
         if ((base.Parent != null) && (base.Parent.ScopeVariables != null))
         {
             for (int j = 0; j < base.Parent.ScopeVariables.Size(); j++)
             {
                 variables.Add(base.Parent.ScopeVariables.GetKey(j), base.Parent.ScopeVariables.Get(j));
             }
         }
         for (int i = 0; i < this.Variables.Length; i++)
         {
             string name = this.Variables[i].GetName().Name;
             if (!variables.Add(name, this.Variables[i]))
             {
                 throw Error.GetError(0x15e6, name);
             }
             if (base.Root.GetParameterIndex(name) != -1)
             {
                 throw Error.GetError(0x15e6, name);
             }
         }
         this.ScopeVariables = variables;
         RangeVariable variable = new RangeVariable(variables, true);
         if (!base.Root.IsTrigger())
         {
             this.RangeVariables = new RangeVariable[] { base.Root.GetParameterRangeVariables()[0], variable };
         }
         else
         {
             this.RangeVariables = new RangeVariable[base.Root.GetParameterRangeVariables().Length + 1];
             Array.Copy(base.Root.GetParameterRangeVariables(), this.RangeVariables, (int)(this.RangeVariables.Length - 1));
             this.RangeVariables[this.RangeVariables.Length - 1] = variable;
         }
         base.Root.VariableCount = variables.Size();
     }
 }
Example #3
0
 private HashMappedList <string, ColumnSchema> GetUnionColumns()
 {
     if (this._unionCorresponding || (this._leftQueryExpression == null))
     {
         HashMappedList <string, ColumnSchema> columnList = ((TableDerived)this.ResultTable).ColumnList;
         HashMappedList <string, ColumnSchema> list3      = new HashMappedList <string, ColumnSchema>();
         for (int i = 0; i < this.UnionColumnMap.Length; i++)
         {
             ColumnSchema schema = columnList.Get(i);
             list3.Add(schema.GetName().Name, schema);
         }
         return(list3);
     }
     return(this._leftQueryExpression.GetUnionColumns());
 }