Class: Couchbase::Management::QueryIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/management/query_index_manager.rb,
/home/runner/work/couchbase-ruby-client/couchbase-ruby-client/lib/couchbase/management/query_index_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|self| ... } ⇒ QueryIndex

Returns a new instance of QueryIndex.

Yield Parameters:



666
667
668
# File 'lib/couchbase/management/query_index_manager.rb', line 666

def initialize
  yield self if block_given?
end

Instance Attribute Details

#bucketString?

Returns the name of the bucket.

Returns:

  • (String, nil)

    the name of the bucket



639
640
641
# File 'lib/couchbase/management/query_index_manager.rb', line 639

def bucket
  @bucket
end

#collectionString?

Returns the name of the collection.

Returns:

  • (String, nil)

    the name of the collection



645
646
647
# File 'lib/couchbase/management/query_index_manager.rb', line 645

def collection
  @collection
end

#conditionString

Note:

that the query service can present the condition in a slightly different manner from when you declared the index. For instance it will wrap expressions with parentheses and show the fields in an escaped format (surrounded by backticks).

Returns the string representation of the index’s condition (the WHERE clause of the index), or an empty Optional if no condition was set.

Returns:

  • (String)

    the string representation of the index’s condition (the WHERE clause of the index), or an empty Optional if no condition was set.



660
661
662
# File 'lib/couchbase/management/query_index_manager.rb', line 660

def condition
  @condition
end

#index_keyArray<String>

Note:

the query service can present the key in a slightly different manner from when you declared the index: for instance, it will show the indexed fields in an escaped format (surrounded by backticks).

Returns an array of Strings that represent the index key(s). The array is empty in the case of a PRIMARY INDEX.

Returns:

  • (Array<String>)

    an array of Strings that represent the index key(s). The array is empty in the case of a PRIMARY INDEX.



652
653
654
# File 'lib/couchbase/management/query_index_manager.rb', line 652

def index_key
  @index_key
end

#is_primaryBoolean Also known as: primary?

Returns true if this is a primary index.

Returns:

  • (Boolean)

    true if this is a primary index



629
630
631
# File 'lib/couchbase/management/query_index_manager.rb', line 629

def is_primary
  @is_primary
end

#nameString

Returns name of the index.

Returns:

  • (String)

    name of the index



626
627
628
# File 'lib/couchbase/management/query_index_manager.rb', line 626

def name
  @name
end

#partitionString

Returns the string representation of the index’s partition.

Returns:

  • (String)

    the string representation of the index’s partition



663
664
665
# File 'lib/couchbase/management/query_index_manager.rb', line 663

def partition
  @partition
end

#scopeString?

Returns the name of the scope.

Returns:

  • (String, nil)

    the name of the scope



642
643
644
# File 'lib/couchbase/management/query_index_manager.rb', line 642

def scope
  @scope
end

#stateSymbol

Returns state.

Returns:

  • (Symbol)

    state



636
637
638
# File 'lib/couchbase/management/query_index_manager.rb', line 636

def state
  @state
end

#type:gsi, :view

Returns type of the index.

Returns:

  • (:gsi, :view)

    type of the index



633
634
635
# File 'lib/couchbase/management/query_index_manager.rb', line 633

def type
  @type
end