| 98 | self.errorhandler(self, ProgrammingError, "execute() first") |
| 99 | |
| 100 | def _warning_check(self): |
| 101 | from warnings import warn |
| 102 | if self._warnings: |
| 103 | warnings = self._get_db().show_warnings() |
| 104 | if warnings: |
| 105 | # This is done in two loops in case |
| 106 | # Warnings are set to raise exceptions. |
| 107 | for w in warnings: |
| 108 | self.messages.append((self.Warning, w)) |
| 109 | for w in warnings: |
| 110 | warn(w[-1], self.Warning, 3) |
| 111 | elif self._info: |
| 112 | self.messages.append((self.Warning, self._info)) |
| 113 | warn(self._info, self.Warning, 3) |
| 114 | |
| 115 | def nextset(self): |
| 116 | """Advance to the next result set. |