Beispiel #1
0
        internal int FindResultInfo(Column destItem
                                    , bool explicitOnly = false
                                    , bool ignoreCase   = true)
        {
            var ret = -1;
            IResultInfoInternal findItem = null;

            for (var i = 0; i < this.Items.Count; ++i)
            {
                var resultInfo = this.Items[i];
                if (explicitOnly && !resultInfo.ExplicitDecl)
                {
                    continue;
                }
                if (resultInfo.IsDirectSource(destItem, ignoreCase))
                {
                    // 抽出元SELECT項目の候補が2つ以上ある場合は例外を返す
                    if (findItem == null)
                    {
                        findItem = resultInfo;
                        ret      = i;
                    }
                    else
                    {
                        throw new InvalidASTStructureError(
                                  "Ambiguous column name: " + resultInfo.ColumnAliasName);
                    }
                }
            }
            return(ret);
        }
Beispiel #2
0
 internal void Insert(int index, IResultInfoInternal item)
 {
     if (index < 0)
     {
         index = reverseIndex(index);
     }
     this.Items.Insert(index, item);
 }
Beispiel #3
0
 internal void Add(IResultInfoInternal item)
 {
     this.Items.Add(item);
 }