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

Improvements to the Tuple and Map parameter binding #359

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented Nov 28, 2024

Summary

Closes #358

  • The client now exports a new wrapper class: TupleParam, as tuples need to be serialized as just strings like ('foo','bar'); however, if it is provided like that in the current version, the single quotes will be escaped, which results in a query failure.

  • Added a proper format for the JS Map type (it was missing previously), as specifying maps as just objects works only if the CH Map key is a String (cause the JS keys are always strings), and fails in case of Ints, etc.

Checklist

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@slvrtrn slvrtrn requested a review from mshustov November 28, 2024 19:13
@slvrtrn slvrtrn merged commit 45c357d into main Nov 29, 2024
27 checks passed
@slvrtrn slvrtrn deleted the tuple-param-wrapper branch November 29, 2024 18:00
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.

Query fails to parse tuple when provided as an array
2 participants