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

Use kwargs in transactions similar to elsewhere in SDK

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • 4.0.x
    • None
    • None
    • None
    • 1

    Description

      Specifically in ctx.query.   I'd like to do something like this: 

      opts = TransactionOptions(scope=<some scope>)
      ctx.query('SELECT * from `$coll` USE KEY "$key", opts, key="foo", coll="_default")
      

      so – the kwargs can override/merge with the options. And, the options can be left out, and just kwargs with appropriate names passed instead. The standard forwarding can probably do this, but these had evolved apart from that.

      Lets see if we can make these options work exactly the same under the covers.

      My guess is transactions.run(...) should work the same, perhaps there are other places?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            david.kelly David Kelly (Inactive)
            david.kelly David Kelly (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty