> >> If we assume that nil's are allowed as values, then calling the lengthI don't understand what you mean with "simply returning the current index + 1"?
> >> operator here (even if it's just for a few nil elements) would require
> >> the underlaying SQL library to iterate through all result rows to
> >> return a length.
> >
> >
> > No, you simply need to return the current index + 1 to continue the loop.