public void Delete(byte[] key) { var k = new Key(key, 0); InternalSet(k, Value.Deleted, null); }
public void CleanIndex(string indexName) { KeyValueStore indexStore = GetSecondaryIndex(indexName); var allValueStoreItems = new HashSet <ByteArray>(this.Enumerate().Select(item => new ByteArray(item.Key))); foreach (var indexItem in indexStore.Enumerate()) { byte[] itemKey = KeyValueStore.ItemKeyFromIndex(indexItem); if (!allValueStoreItems.Contains(new ByteArray(itemKey))) { indexStore.Delete(indexItem.Key); } } }