Skip to content

handle <null> type in query results #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

handle <null> type in query results #177

wants to merge 1 commit into from

Conversation

butson
Copy link
Contributor

@butson butson commented Apr 24, 2025

In order to support a type column being returned from engine. A TypeObject is needed instead of returning None. As None is used to verify that the type returned is in the TYPEMAP.

cursor.execute('select NULL from DUAL')

fails without this change. There are other cases where a user might explictly return NULL in place of an actual value. Say in a view such as INFORMATION_SCHEMA.COLUMNS where we don't support DOMAIN_NAME column.

The above example was added to tests/nuodb_types_test.py

engine.  A TypeObject is needed instead of returning None.  As
None is used to verify that the type returned is in the TYPEMAP.

cursor.execute('select NULL from DUAL')

fails without this change.  There are other cases where a user might
explictly return NULL in place of an actual value.  Say in a view such
as INFORMATION_SCHEMA.COLUMNS where we don't support DOMAIN_NAME column.

The above example was added to tests/nuodb_types_test.py
@butson butson requested a review from madscientist April 24, 2025 16:28
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.

1 participant