Skip to content

Conversation

patrickpichler
Copy link

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