public override void Delete(byte[] key) { if (key == null) { throw new ArgumentNullException("key"); } db.Delete(key); }
public void Delete() { using var log = Log(); using LevelDB.DB <string, string> db = GetTestDb(); db.Delete("a").Delete("c").Delete("m").Delete("n"); Assert.Equal( "b=2;l=12;x=24;y=25;z=26", string.Join(";", db.GetIterable().Select(kv => $"{kv.Key}={kv.Value}"))); }
public void Snapshot() { using var log = Log(); using LevelDB.DB <string, string> db = GetTestDb(); IIterable <string, string> it = db.GetIterable().Snapshot(); db.Delete("a").Delete("c").Delete("m").Delete("n"); Assert.Equal( "a=1;b=2;c=3;l=12;m=13;n=14;x=24;y=25;z=26", string.Join(";", it.Select(kv => $"{kv.Key}={kv.Value}"))); it.Snapshot(); Assert.Equal( "b=2;l=12;x=24;y=25;z=26", string.Join(";", it.Select(kv => $"{kv.Key}={kv.Value}"))); }
public override void RemoveMap(long mapid) { BedrockDB.Delete(Encoding.Default.GetBytes($"map_{mapid}")); }