public void DatabaseDeleteShouldRemoveItem() { var key = "key"; var value = "value"; _txn.Put(_db, key, value); _txn.Delete(_db, key); Assert.False(_txn.ContainsKey(_db, key)); }
public void DatabaseDeleteShouldRemoveItem() { //arrange var key = "key"; var value = "value"; _txn.Put(_db, key, value); //act _txn.Delete(_db, key); //assert Assert.IsFalse(_txn.ContainsKey(_db, key)); }
private void DeleteImpl(IEnumerable <TKey> keys) { foreach (var key in keys.Select(_settings.SerializeKey)) { if (_tx.ContainsKey(_db, key)) { _tx.Delete(_db, key); } } }
public static bool ContainsKey(this LightningTransaction tx, LightningDatabase db, string key) { var enc = System.Text.Encoding.UTF8; return(tx.ContainsKey(db, enc.GetBytes(key))); }