Class: Couchbase::Management::QueryIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/management/query_index_manager.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/management/query_index_manager.rb
more...

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of QueryIndex.

Yield Parameters:

[View source]

525
526
527
# File 'lib/couchbase/management/query_index_manager.rb', line 525

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


492
493
494
# File 'lib/couchbase/management/query_index_manager.rb', line 492

def bucket
  @bucket
end

#collectionString?

Returns the name of the collection.

Returns:

  • (String, nil)

    the name of the collection


498
499
500
# File 'lib/couchbase/management/query_index_manager.rb', line 498

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.


519
520
521
# File 'lib/couchbase/management/query_index_manager.rb', line 519

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.


511
512
513
# File 'lib/couchbase/management/query_index_manager.rb', line 511

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


482
483
484
# File 'lib/couchbase/management/query_index_manager.rb', line 482

def is_primary
  @is_primary
end

#key_spaceString

Returns the key space for the index, typically the bucket name.

Returns:

  • (String)

    the key space for the index, typically the bucket name.


501
502
503
# File 'lib/couchbase/management/query_index_manager.rb', line 501

def key_space
  @key_space
end

#nameString

Returns name of the index.

Returns:

  • (String)

    name of the index


479
480
481
# File 'lib/couchbase/management/query_index_manager.rb', line 479

def name
  @name
end

#name_spaceString

Returns the namespace for the index. A namespace is a resource pool that contains multiple key spaces.

Returns:

  • (String)

    the namespace for the index. A namespace is a resource pool that contains multiple key spaces.


504
505
506
# File 'lib/couchbase/management/query_index_manager.rb', line 504

def name_space
  @name_space
end

#partitionString

Returns the string representation of the index’s partition.

Returns:

  • (String)

    the string representation of the index’s partition


522
523
524
# File 'lib/couchbase/management/query_index_manager.rb', line 522

def partition
  @partition
end

#scopeString?

Returns the name of the scope.

Returns:

  • (String, nil)

    the name of the scope


495
496
497
# File 'lib/couchbase/management/query_index_manager.rb', line 495

def scope
  @scope
end

#stateSymbol

Returns state.

Returns:

  • (Symbol)

    state


489
490
491
# File 'lib/couchbase/management/query_index_manager.rb', line 489

def state
  @state
end

#type:gsi, :view

Returns type of the index.

Returns:

  • (:gsi, :view)

    type of the index


486
487
488
# File 'lib/couchbase/management/query_index_manager.rb', line 486

def type
  @type
end