Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-526

Add N1QL query metrics option and server results

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • None
    • None

    Description

      It's not currently possible to set the metrics option directly in a N1QL request, like other SDKs. Instead, it must be done through the `set_option` function and it's results are added to the result's meta dictionary.

      Example of requesting via `set_option`

      query = N1QLQuery('SELECT 1 from `default`')
      query.set_option('metrics', True)
      result = b.n1ql_query(query)
       
      # have to process all rows first
      for row in result:
          print row
       
      # metrics is an entry in result.meta
      print result.meta
      

      Attachments

        For Gerrit Dashboard: PYCBC-526
        # Subject Branch Project Status CR V

        Activity

          There are no comments yet on this issue.

          People

            Ellis.Breen Ellis Breen
            mike.goldsmith Michael Goldsmith
            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