Parse the 'Field Descriptor' (Metadata) packet. This is compatible with MySQL 4.1+ (not compatible with MySQL 4.0).
(self, encoding)
| 234 | self._parse_field_descriptor(encoding) |
| 235 | |
| 236 | def _parse_field_descriptor(self, encoding): |
| 237 | """Parse the 'Field Descriptor' (Metadata) packet. |
| 238 | |
| 239 | This is compatible with MySQL 4.1+ (not compatible with MySQL 4.0). |
| 240 | """ |
| 241 | self.catalog = self.read_length_coded_string() |
| 242 | self.db = self.read_length_coded_string() |
| 243 | self.table_name = self.read_length_coded_string().decode(encoding) |
| 244 | self.org_table = self.read_length_coded_string().decode(encoding) |
| 245 | self.name = self.read_length_coded_string().decode(encoding) |
| 246 | self.org_name = self.read_length_coded_string().decode(encoding) |
| 247 | ( |
| 248 | self.charsetnr, |
| 249 | self.length, |
| 250 | self.type_code, |
| 251 | self.flags, |
| 252 | self.scale, |
| 253 | ) = self.read_struct("<xHIBHBxx") |
| 254 | # 'default' is a length coded binary and is still in the buffer? |
| 255 | # not used for normal result sets... |
| 256 | |
| 257 | def description(self): |
| 258 | """Provides a 7-item tuple compatible with the Python PEP249 DB Spec.""" |
no test coverage detected