MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / description

Method description

pymysql/protocol.py:257–267  ·  view source on GitHub ↗

Provides a 7-item tuple compatible with the Python PEP249 DB Spec.

(self)

Source from the content-addressed store, hash-verified

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."""
259 return (
260 self.name,
261 self.type_code,
262 None, # TODO: display_length; should this be self.length?
263 self.get_column_length(), # 'internal_size'
264 self.get_column_length(), # 'precision' # TODO: why!?!?
265 self.scale,
266 self.flags % 2 == 0,
267 )
268
269 def get_column_length(self):
270 if self.type_code == FIELD_TYPE.VAR_STRING:

Callers 1

_get_descriptionsMethod · 0.80

Calls 1

get_column_lengthMethod · 0.95

Tested by

no test coverage detected