I’m afraid that basically the whole idea of the lazy loading in SQLContainer is against you on this one. You want to select a row based on the contents of some cell within that row. Due to lazy loading, the container can’t even in theory know where this row is, without going through all the rows until the correct one is found, just like you have done.
I’d say that unless you can think of some way to get the index of the row you are looking for, you can’t do this in any other way than the way you’re already doing it.
If it’s enough that your table shows just the matching row(s), you could add a filter to the container and let the container do the work. If it’s not enough, I think you’re out of luck.
yes, that’s a bit simpler code-wise. But it still has to loop through the items (load more and more batches) until it finds the matching one, so I think it isn’t more efficient than the previous method you used. Of course, if you don’t have that many rows in the DB this is perfectly acceptable.