(self, packet)
| 1427 | self.rows = tuple(rows) |
| 1428 | |
| 1429 | def _read_row_from_packet(self, packet): |
| 1430 | row = [] |
| 1431 | for encoding, converter in self.converters: |
| 1432 | try: |
| 1433 | data = packet.read_length_coded_string() |
| 1434 | except IndexError: |
| 1435 | # No more columns in this row |
| 1436 | # See https://github.com/PyMySQL/PyMySQL/pull/434 |
| 1437 | break |
| 1438 | if data is not None: |
| 1439 | if encoding is not None: |
| 1440 | data = data.decode(encoding) |
| 1441 | if DEBUG: |
| 1442 | print("DEBUG: DATA = ", data) |
| 1443 | if converter is not None: |
| 1444 | data = converter(data) |
| 1445 | row.append(data) |
| 1446 | return tuple(row) |
| 1447 | |
| 1448 | def _get_descriptions(self): |
| 1449 | """Read a column descriptor packet for each column in the result.""" |
no test coverage detected