trinodb / trino-python-client

Python client for Trino
Apache License 2.0
328 stars 163 forks source link

Enhance `Cursor.description` with type information #297

Closed mdesmet closed 1 year ago

mdesmet commented 1 year ago

Description

Add internal_size, precision, scale to Cursor.description to make it easier to get type information of a result set.

Note that if this information can be extracted from the type, this is also removed from the type_code, making it easier to match on.

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required. ( ) Release notes are required, please propose a release note for me. (x) Release notes are required, with the following suggested text:

* Enhance `Cursor.description` with type information
mdesmet commented 1 year ago

This can be looked at again after PARAMETRIC_DATETIME is merged as now no type information is exposed for temporal types.