Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-20128

OBJECT_PAIRS produces n1ql reserved word

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.6.0, 5.0.0
    • 4.5.0
    • query

    Description

      Hi Query team,

      a guy in gitter asked for some help and we stumbled across a solution with OBJECT_PAIRS that works fine, but the odd part is that it produces a "value" which seems to be a reserved word.

      We fixed it by escaping value:

      SELECT customers.* FROM bucketname AS customers WHERE ANY address IN OBJECT_PAIRS(customers.addresses) SATISFIES address.`value`.line1 = '123 any street' END
      

      But it seems a little odd that you need to escape something that comes out of a built-in function all the time. has this been considered?

      Thanks!

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Prerna.Manaktala Prerna Manaktala (Inactive)
              daschl Michael Nitschinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty