示例#1
0
        private IEnumerable <long> TakeFromTo(PartitionRowIDRange part, IEnumerable <long> rowIds)
        {
            foreach (var rowId in rowIds)
            {
                if (rowId < part.Low)
                {
                    yield break;
                }

                if (rowId <= part.High)
                {
                    yield return(RowIDUtil.ToRowID(part.PartitionID, rowId));
                }
            }
        }
示例#2
0
 private IEnumerable <long> IsPartitionMatch(IReadTransactionContext tx, PartitionRowIDRange part,
                                             IPartitionReader partition, ERowIDSortDirection sortDirection)
 {
     if (sortDirection == ERowIDSortDirection.Asc)
     {
         for (long rowId = part.Low; rowId <= part.High; rowId++)
         {
             if (IsMatch(partition, tx.ReadCache, rowId))
             {
                 yield return(RowIDUtil.ToRowID(part.PartitionID, rowId));
             }
         }
     }
     else
     {
         for (long rowId = part.High; rowId >= part.Low; rowId--)
         {
             if (IsMatch(partition, tx.ReadCache, rowId))
             {
                 yield return(RowIDUtil.ToRowID(part.PartitionID, rowId));
             }
         }
     }
 }