Skip to content
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

Handle nullable columns for databases using pointers #152

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

Conversation

patrickpichler
Copy link
Contributor

Some databases (e.g. clickhouse) is using pointer values to represent nullable values when querying from the database. The current logic to transform values to strings when querying data, does not handle this correctly. It will simply transform the pointer to a string, which results in the pointer address being printed.

To handle this, the value reported from the sql driver will now tried to be extracted, if it is a pointer. This means the value of the pointer will then be transformed to a string, instead of the pointer directly.

Additionally, some cases where this was causing issues in the clickhouse implementation have been fixed.

Fixes #151

Some databases (e.g. clickhouse) is using pointer values to represent
nullable values when querying from the database. The current logic to
transform values to strings when querying data, does not handle this
correctly. It will simply transform the pointer to a string, which
results in the pointer address being printed.

To handle this, the value reported from the sql driver will now tried to
be extracted, if it is a pointer. This means the value of the pointer
will then be transformed to a string, instead of the pointer directly.

Additionally, some cases where this was causing issues in the clickhouse
implementation have been fixed.

Fixes sqls-server#151
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.

Nullable fields cause pointer addresses to be printed
1 participant