MonetDB / pymonetdb

The Python API for MonetDB
https://www.monetdb.org/
Mozilla Public License 2.0
28 stars 20 forks source link

Improve interval support #76

Closed aris-koning closed 4 years ago

aris-koning commented 4 years ago

This pull request is based on previous work from #69. It constitutes some fixes for SEC_INTERVAL type and tests for the SEC_INTERVAL and MONTH_INTERVAL types.

This pull request allows application developers to benefit from a 1-1 correspondence between Python's datetime.timedelta class and MonetDB's INTERVAL SECOND type.

Concerning the MONTH_INTERVAL type: unfortunately there is no native Python type that has a natural fit to the MONTH_INTERVAL. But at least application developers can expect any returned query result of this type to be handled as a normal Python int.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.07%) to 76.171% when pulling 8f81a7440a4e1445cfec1d559132f1174614fff9 on MonetDBSolutions:master into 8e6830d005d0f25e7d4630423e40014057058919 on gijzelaerr:master.

gijzelaerr commented 4 years ago

small request for adding type information, apart from that looks good! Thanks.

gijzelaerr commented 4 years ago

the travis build for python 3.8 is also failing, not sure why the integration is disabled: https://travis-ci.org/github/gijzelaerr/pymonetdb/jobs/733378555

aris-koning commented 4 years ago

I added the missing new line that Travis was complaining about. But I don't know what ymonetdb/mapi.py:244:49: E741 ambiguous variable name 'l' means in the failing Travis output.

gijzelaerr commented 4 years ago

thanks!

aris-koning commented 4 years ago

You're welcome.