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
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.4
    • 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

        For Gerrit Dashboard: PYCBC-986
        # Subject Branch Project Status CR V

        Activity

          There are no comments yet on this issue.

          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