RazorDB.KeyValueStore.Delete C# (CSharp) Method

Delete() public method

public Delete ( byte key ) : void
key byte
return void
        public void Delete(byte[] key) {
            var k = new Key(key, 0);
            InternalSet(k, Value.Deleted, null);
        }

Usage Example

Exemplo n.º 1
0
        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);
                }
            }
        }
All Usage Examples Of RazorDB.KeyValueStore::Delete