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

Expose and document 'condition' parameter used to create partial N1QL indices

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.0.4
    • None
    • None
    • None
    • 1
    • SDK28: Txn Loop/Rb,PfQueryColl, SDK32: QueryCollections, SDK30: Connect,Txns

    Description

      This parameter appears to currently only be available via a call like this.

      cluster.query_indexes()._n1ql_index_create(
          'widget',
          'idx_widget_business_address_missing_type',
          defer=False,
          ignore_exists=False,
          primary=False,
          fields=['address'],
          cond='`type` is missing',
          timeout=None,)
      

      While not mentioned explicitly in the SDK3 RFCs, this was an important piece of functionality in SDK2 that we should migrate to SDK3.

      It appears the following works, although I'm not clear on how the condition is being passed through, yet:

      cluster.query_indexes().create_index('widget', 'idx_widget_business_address_missing_type', ['address'], CreateQueryIndexOptions(ignore_if_exists=True), "`type` is missing")
      

      Attachments

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

        Activity

          People

            Ellis.Breen Ellis Breen
            Ellis.Breen Ellis Breen
            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