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
    • Resolution: Fixed
    • Major
    • 2.5.0
    • None
    • 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

          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