Details
-
Improvement
-
Resolution: Fixed
-
Major
-
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 |
100128,15 | PYCBC-526: Add N1QL query metrics option and server results | master | couchbase-python-client | Status: MERGED | +2 | +1 |