Skip to content

CXXCBC-684: Allow setting both named and positional parameters for queries#759

Merged
avsej merged 1 commit intocouchbase:mainfrom
DemetrisChr:CXXCBC-684-both-named-positional
May 8, 2025
Merged

CXXCBC-684: Allow setting both named and positional parameters for queries#759
avsej merged 1 commit intocouchbase:mainfrom
DemetrisChr:CXXCBC-684-both-named-positional

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

Motivation

The query and analytics services allow queries that have named and positional parameters in the same request. We should allow users to make queries with both types of parameters.

Changes

Public API:

  • Update query_options & analytics_options so that setting named parameters doesn't clear any existing positional parameters and vice versa.
  • Document the fact that setting positional parameters overrides existing positional parameters, and setting named parameters overrides existing named parameters.

Core API:

  • Update encoding of query/analytics_query requests so both named and positional parameters are included in the payload if both have been set.

@DemetrisChr DemetrisChr force-pushed the CXXCBC-684-both-named-positional branch from 22e27c8 to 37dfce5 Compare May 1, 2025 14:17
@avsej avsej marked this pull request as draft May 1, 2025 17:50
@avsej
Copy link
Copy Markdown
Member

avsej commented May 1, 2025

Lets wait until whole team will make decision whether we want this kind of behaviour change.

@DemetrisChr
Copy link
Copy Markdown
Contributor Author

I've proposed revisions to the relevant RFCs here: couchbaselabs/sdk-rfcs#148

Once/if that's accepted and merged we can also merge this.

@DemetrisChr DemetrisChr marked this pull request as ready for review May 8, 2025 10:32
@avsej avsej merged commit a86acb9 into couchbase:main May 8, 2025
24 of 27 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.

2 participants