Closed cypres-it closed 6 years ago
I am assuming that you are referring to sqlalchemy.types.Interval, if so we don’t have support yet. The SQLAlchemy support is a priority item in our list. By any chance if you are accessing Informix interval type value then you should be able to get it in as string.
I want to use the informix interval type:
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.sqlr.doc/ids_sqr_123.htm
At the moment I have to convert the interval explicitly to/from a string.
If I do a "select * from ..." then the interval type column values will be NULL/None.
Ideally I would like the driver to automatically convert interval types from/to the Python type datetime.timedelta.
The second best thing would be if the driver would at least automatically convert the intervals in select result sets to a string instead of just dropping the values and returning None.
The current behaviour makes dealing with interval types really cumbersome especially when you are dealing with dynamic query generation and the like.
We want to migrate from the old "informixdb" driver to IfxPy. However informixdb handled these types transparently converting them automatically from/to timedelta values in Python.
Thanks for the information, certainly we will consider it as feature request. As you know the driver source code is publically available you may too make the code change. By any chance if you make the code change please send us a pull request.
This is really needed - maybe you give it a high priority
@cypres-it Thanks Very Much for the pull request, we will test an upload to PyPi, the it will be available with pip install.
@cypres-it 👍
Pull#7
Am I right that IFxPy currently does not support interval types?