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 |