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:

[View source]

292
293
294
# File 'lib/couchbase/management/query_index_manager.rb', line 292

def initialize
  yield self if block_given?
end

Instance Attribute Details

#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.


289
290
291
# File 'lib/couchbase/management/query_index_manager.rb', line 289

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.


280
281
282
# File 'lib/couchbase/management/query_index_manager.rb', line 280

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


260
261
262
# File 'lib/couchbase/management/query_index_manager.rb', line 260

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.


270
271
272
# File 'lib/couchbase/management/query_index_manager.rb', line 270

def key_space
  @key_space
end

#nameString

Returns name of the index.

Returns:

  • (String)

    name of the index


257
258
259
# File 'lib/couchbase/management/query_index_manager.rb', line 257

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.


273
274
275
# File 'lib/couchbase/management/query_index_manager.rb', line 273

def name_space
  @name_space
end

#stateSymbol

Returns state.

Returns:

  • (Symbol)

    state


267
268
269
# File 'lib/couchbase/management/query_index_manager.rb', line 267

def state
  @state
end

#type:gsi, :view

Returns type of the index.

Returns:

  • (:gsi, :view)

    type of the index


264
265
266
# File 'lib/couchbase/management/query_index_manager.rb', line 264

def type
  @type
end