(self)
| 543 | return super().__next__() |
| 544 | |
| 545 | def __bool__(self): |
| 546 | # The ResultSet class class doesn't need to support __bool__ explicitly |
| 547 | # because it has __len__. Since SqliteResultSet doesn't support len, |
| 548 | # we need to peep into the result to find if the result is empty of not. |
| 549 | if self._head is None: |
| 550 | try: |
| 551 | self._head = next(self) |
| 552 | self._index -= 1 # reset the index |
| 553 | except StopIteration: |
| 554 | return False |
| 555 | return True |
| 556 | |
| 557 | |
| 558 | class Transaction: |