Skip to content

CXXCBC-672: Add add_named_parameter and add_positional_parameter to query/analytics options#762

Merged
DemetrisChr merged 2 commits intocouchbase:mainfrom
DemetrisChr:CXXCBC-672-params-at-runtime
May 9, 2025
Merged

CXXCBC-672: Add add_named_parameter and add_positional_parameter to query/analytics options#762
DemetrisChr merged 2 commits intocouchbase:mainfrom
DemetrisChr:CXXCBC-672-params-at-runtime

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

Motivation

Our existing high-level positional_parameters and named_parameters setters require the number of parameters to be known at compile time. While encoded_positional_parameters and encoded_named_parameters can be used if the number of parameters is not known at compile time, that's a low-level uncommitted API, so we should provide a high-level alternative.

Changes

Add new methods to analytics_options & query_optionsadd_named_parameter, add_positional_parameter, clear_positional_parameters, and clear_named_parameters.

These allow any number of parameters to be set even when that's not known at compile time, without the user having to serialize them.

@DemetrisChr DemetrisChr force-pushed the CXXCBC-672-params-at-runtime branch from 8d7ca6e to b44f652 Compare May 8, 2025 11:13
@DemetrisChr DemetrisChr merged commit 3b4c159 into couchbase:main May 9, 2025
24 of 27 checks passed
@DemetrisChr DemetrisChr deleted the CXXCBC-672-params-at-runtime branch May 9, 2025 10:25
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.

2 participants