Class: Couchbase::Management::QueryIndex

Inherits:
Object
  • Object
show all
Defined in:
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:



612
613
614
# File 'lib/couchbase/management/query_index_manager.rb', line 612

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



585
586
587
# File 'lib/couchbase/management/query_index_manager.rb', line 585

def bucket
  @bucket
end

#collectionString?

Returns the name of the collection.

Returns:

  • (String, nil)

    the name of the collection



591
592
593
# File 'lib/couchbase/management/query_index_manager.rb', line 591

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.



606
607
608
# File 'lib/couchbase/management/query_index_manager.rb', line 606

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.



598
599
600
# File 'lib/couchbase/management/query_index_manager.rb', line 598

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



575
576
577
# File 'lib/couchbase/management/query_index_manager.rb', line 575

def is_primary
  @is_primary
end

#nameString

Returns name of the index.

Returns:

  • (String)

    name of the index



572
573
574
# File 'lib/couchbase/management/query_index_manager.rb', line 572

def name
  @name
end

#partitionString

Returns the string representation of the index’s partition.

Returns:

  • (String)

    the string representation of the index’s partition



609
610
611
# File 'lib/couchbase/management/query_index_manager.rb', line 609

def partition
  @partition
end

#scopeString?

Returns the name of the scope.

Returns:

  • (String, nil)

    the name of the scope



588
589
590
# File 'lib/couchbase/management/query_index_manager.rb', line 588

def scope
  @scope
end

#stateSymbol

Returns state.

Returns:

  • (Symbol)

    state



582
583
584
# File 'lib/couchbase/management/query_index_manager.rb', line 582

def state
  @state
end

#type:gsi, :view

Returns type of the index.

Returns:

  • (:gsi, :view)

    type of the index



579
580
581
# File 'lib/couchbase/management/query_index_manager.rb', line 579

def type
  @type
end