Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
1
-
SDK50
Description
Update QueryParametersTest.parametersPositionalWithQuestionMarkAndNameFailure() according to final decision on this discussion: https://couchbase.slack.com/archives/C05LNBVQRE3/p1699376965568179
------------------------------------
For QueryParametersTest.parametersPositionalWithQuestionMarkAndNameFailure() we are trying to set positional and named parameters together, where GO performer is throwing below error:
io.grpc.StatusRuntimeException: ABORTED: transaction failed to run: failed to generate query options: invalid arguments: Positional and named parameters must be used exclusively | {"statement":"SELECT * FROM `_default` WHERE META().id = ? AND content = $content "} |
and RFC states: * parameters(JsonObject | JsonArray) = undefined
- Specifies positional or named parameters
- For languages that do not support operator overloading, the alternative naming is positionalParameters(JsonArray) and namedParameters(JsonObject)
- Sent in the JSON payload
-
- For positional parameters as a json array under the "args" key
- For named parameters directly in the JSON payload, but each named argument is prefixed with "$" if it doesn't already have the dollar prefix provided by the user
- Setting JsonArray or JsonObject overrides any previously set parameters
Looks like a violation of the last line for GO
Attachments
For Gerrit Dashboard: GOCBC-1549 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
202622,3 | GOCBC-1549: Allow both positional and named parameters to be set in query | master | gocb | Status: MERGED | +2 | +1 |