trinodb / trino-python-client

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

Enhance `Cursor.description` with type information #315

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 upon.

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:

* Add type information to DBAPI's cursor description (internal_size, scale, precision)