Hi
In below ref I see we can do certain level of optimization in n1ql query .
https://docs.couchbase.com/python-sdk/current/n1ql-queries-with-sdk.html#options
Can you please help me understand this little bit ?
No-result queries
As a convenience for queries which are not intended to yield multiple rows, you may use the returned N1QLRequest
object’s execute()
method. For queries which are intended to return only a single result, you can use the get_single_result()
method. Both of the aforementioned methods are wrappers that iterate over the object internally and are intended to provide additional clarity inside your application’s code.
bkt.n1ql_query("CREATE PRIMARY INDEX ON default").execute()
I am simply using : row_iter = cb.n1ql_query(query) to return the N1QLRequest object , what is additional benefit I will get if I do execute() as well ?