Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1549

Update QueryParametersTest.parametersPositionalWithQuestionMarkAndNameFailure()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.7.1
    • None
    • None
    • None

    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

        Activity

          People

            Dimitris.Christodoulou Dimitris Christodoulou
            aaliya.haque Aaliya Haque
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty