Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-822

ViewOrdering parameter is not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.1
    • None
    • library
    • None
    • 1

    Description

      In SDK 3 up to and including 3.1.0, the ViewOrdering parameter is not working. An order value of ViewOrdering.Descending is ignored and the results are returned in ascending order.
      Also, if you set order to Descending, and a range with start set to the high key and end set to the low key, you get an error:
      ‘No rows can match your key range, reverse your start_key and end_key or set descending=true’

      I’ve just looked at the SDK source and can see the reason for this. In viewexecutor.js it says:

       

      {{ if (options.order > 0)

      { queryOpts.descending = false; }

      else if (options.order < 0)

      { queryOpts.descending = true; }

      }}

      This should be “if (options.order === ViewOrdering.Ascending)…”. If I pass a value of -1 to order it works.

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            arun.vijayraghavan Arun Vijayraghavan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty