public IEnumerable <KeyValuePair <byte[], byte[]> > Filter(IFilter filter) { foreach (var file in m_versionSet.Files) { if (filter.Compare(file.Smallest.UserKey) >= 0 && filter.Compare(file.Largest.UserKey) <= 0) { file.AssureOpen(m_path, m_sharedCache); foreach (var item in file.Filter(filter)) { yield return(item); } } } }
public IEnumerable <KeyValuePair <byte[], byte[]> > Match(IFilter filter) { for (int i = 0; i < m_keys.Count; ++i) { if (filter.Compare(m_keys[i]) == 0) { yield return(new KeyValuePair <byte[], byte[]>(m_keys[i], m_values[i])); } } }
public IEnumerable <KeyValuePair <byte[], byte[]> > Filter(IFilter filter, byte[] largest) { int count = m_keys.Count; for (int i = 0; i < count; ++i) { if (filter.Compare(m_keys[i]) <= 0) { yield return(new KeyValuePair <byte[], byte[]>(m_keys[i], m_values[i])); } } }