func Delete(index core.Uint32Index, buffer dbio.DataBuffer, id uint32) error { rowID, err := index.Find(id) if err != nil { return err } allocator := core.NewRecordAllocator(buffer) if err := allocator.Remove(rowID); err != nil { return err } return index.Delete(id) }
func assertIndexCanDeleteByKey(t *testing.T, index core.Uint32Index, key int) { index.Delete(uint32(key)) assertIndexCantFindByKey(t, index, key) }