Skip to content

Support interface typed NamedValue binding#1633

Merged
SpencerTorres merged 8 commits intoClickHouse:mainfrom
crisismaple:new_named_arg
Sep 24, 2025
Merged

Support interface typed NamedValue binding#1633
SpencerTorres merged 8 commits intoClickHouse:mainfrom
crisismaple:new_named_arg

Conversation

@crisismaple
Copy link
Copy Markdown
Contributor

Summary

Support interface typed NamedValue binding issue #1632

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added

@crisismaple
Copy link
Copy Markdown
Contributor Author

@SpencerTorres could you please help to review this change? ;)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for interface-typed NamedValue binding in ClickHouse query parameters, addressing issue #1632. Previously, only string values were supported for named parameters, but now the driver can handle various interface{} types by formatting them appropriately.

  • Removes the restriction that required string values for NamedValue parameters
  • Adds formatting logic to convert interface{} values to strings using the existing format function
  • Updates tests to verify both string and non-string interface values work correctly

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
query_parameters.go Implements interface value formatting for NamedValue parameters and removes related error constant
tests/std/query_parameters_test.go Updates test to verify interface-typed NamedValue binding works instead of expecting an error
tests/query_parameters_test.go Updates test to verify interface-typed NamedValue binding works instead of expecting an error

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@crisismaple
Copy link
Copy Markdown
Contributor Author

@SpencerTorres please help to review this change :)

Copy link
Copy Markdown
Member

@SpencerTorres SpencerTorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mshustov mshustov requested a review from kavirajk September 24, 2025 07:53
@kavirajk
Copy link
Copy Markdown
Contributor

@crisismaple thanks for the contribution :) can you add short summary on CHANGELOG please?

@SpencerTorres SpencerTorres merged commit b9dda77 into ClickHouse:main Sep 24, 2025
14 checks passed
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.

5 participants