コード例 #1
0
 public IEnumerable <long> GetValues(int valueKey, PartitionTxData tx)
 {
     if (_datarIndex == null)
     {
         throw new NFSdbConfigurationException("Index does not exists for column "
                                               + _globalSymColumn.PropertyName);
     }
     if (valueKey == NOT_FOUND_VALUE)
     {
         return(EMPTY_RESULT);
     }
     return(_datarIndex.GetValues(valueKey, tx));
 }
コード例 #2
0
        private int CheckKeySlow(string value, int hashKey, SymbolCache symbolCache, PartitionTxData tx)
        {
            var values = _symrIndex.GetValues(hashKey, tx);

            foreach (var possibleKey in values)
            {
                var    key = (int)possibleKey;
                string possibleValue;
                if (!symbolCache.IsValueCached(hashKey, out possibleValue))
                {
                    possibleValue = _globalSymColumn.GetString(key, tx.ReadCache);
                    symbolCache.SetRowID(possibleValue, key);
                    if (string.Equals(value, possibleValue, StringComparison.Ordinal))
                    {
                        if (value == null)
                        {
                            key = MetadataConstants.NULL_SYMBOL_VALUE;
                        }
                        return(key);
                    }
                }
            }
            return(NOT_FOUND_VALUE);
        }