Comment 2 for bug 900564

Revision history for this message
Rick Harris (rconradharris) wrote : Re: Context.read_deleted returns only deleted records

I had batted around the idea of using two boolean flags to represent this. In the end, I rejected that idea (for now) based on two reasons:

1. Splitting the variable into two variables felt like it would be more difficult to get right. Given the amount of delicate code that has to change, I wasn't sure that I could manage that refactoring and ensure approx 100% correctness.

With a single variable becoming an enum, I could wrap my head around it a bit more, and found it much easier to spot check the code.

2. Having 2 boolean variables leads to 4 combinations. But only 3 combinations are valid: (cannot-read-deleted, fetch-deleted) is bogus. It felt cleaner and safer to prevent anyone from even attempting that combination by using the enum.