public void Commit(WriteBatch batch) { switch (State) { case TrackState.Added: case TrackState.Changed: batch.Put(prefix, Item.ToArray()); break; case TrackState.Deleted: batch.Delete(prefix); break; } }
public static void Delete(this WriteBatch batch, byte prefix, ISerializable key) { batch.Delete(SliceBuilder.Begin(prefix).Add(key)); }
public override void DeleteInternal(TKey key) { batch?.Delete(prefix, key); }