Skip to content

Dtypes#21

Open
jesaerys wants to merge 2 commits intobaztian:masterfrom
jesaerys:dtypes
Open

Dtypes#21
jesaerys wants to merge 2 commits intobaztian:masterfrom
jesaerys:dtypes

Conversation

@jesaerys
Copy link

@jesaerys jesaerys commented Mar 1, 2016

I have included a few more data types to the _DEFAULT_CONVERTERS dictionary. All of these were already mapped in DBAPITypeObject, except for TINYINT, which is new.

I also altered _to_datetime, _to_date, and _to_time to return objects from the datetime module instead of strings. This behavior seems to be more consistent with the DB API 2.0 spec.

I have to admit that I tried following the README_development.rst instructions to run the tests, but I ran into issues at the jip install steps that prevented me from doing so. I hope this doesn't cause too much of a problem.

jesaerys added 2 commits February 29, 2016 22:11
TINYINT is mapped to NUMBER, and all of the types mapped to DB API type are
assigned to a conversion function.
DB API 2.0 suggests using the datetime module to represent dates and times.
Note that parsing the java value string is ~2x faster than 1) using
datetime.datetime.strptime on java_val.toString() and 2) constructing
datetime.datetime directory with java_val.getYear(), java_val.getMonth(), etc.
@testlnord
Copy link

I also ran into issue with jip install. They promise to fix it in nearest time.

Any way there is a simple workaround. You can just remove .jip_index file from your virtualenv directory after each installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants