Class: Couchbase::Management::Options::Analytics::DropIndex

Inherits:
Options::Base
  • Object
show all
Defined in:
lib/couchbase/management/analytics_index_manager.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from Options::Base

#client_context, #parent_span, #retry_strategy, #timeout

Instance Method Summary collapse

Constructor Details

#initialize(ignore_if_does_not_exist: false, dataverse_name: nil, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ DropIndex

Creates an instance of options for AnalyticsIndexManager#drop_index

Parameters:

  • ignore_if_does_not_exist (Boolean) (defaults to: false)

    if true, the exception Error::DatasetNotFound will not be raised if the dataset with the specified name does not exist.

  • dataverse_name (String) (defaults to: nil)

    the name of the dataverse to use (defaults to nil)

  • timeout (Integer, #in_milliseconds, nil) (defaults to: nil)

    the time in milliseconds allowed for the operation to complete

  • retry_strategy (Proc, nil) (defaults to: nil)

    the custom retry strategy, if set

  • client_context (Hash, nil) (defaults to: nil)

    the client context data, if set

  • parent_span (Span, nil) (defaults to: nil)

    if set holds the parent span, that should be used for this request

Yield Parameters:



250
251
252
253
254
255
256
257
258
259
260
# File 'lib/couchbase/management/analytics_index_manager.rb', line 250

def initialize(ignore_if_does_not_exist: false,
               dataverse_name: nil,
               timeout: nil,
               retry_strategy: nil,
               client_context: nil,
               parent_span: nil)
  super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
  @ignore_if_does_not_exist = ignore_if_does_not_exist
  @dataverse_name = dataverse_name
  yield self if block_given?
end

Instance Attribute Details

#dataverse_nameString

Returns:

  • (String)


236
237
238
# File 'lib/couchbase/management/analytics_index_manager.rb', line 236

def dataverse_name
  @dataverse_name
end

#ignore_if_does_not_existBoolean

Returns:

  • (Boolean)


235
236
237
# File 'lib/couchbase/management/analytics_index_manager.rb', line 235

def ignore_if_does_not_exist
  @ignore_if_does_not_exist
end

Instance Method Details

#to_backendObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



263
264
265
266
267
268
269
# File 'lib/couchbase/management/analytics_index_manager.rb', line 263

def to_backend
  {
    timeout: Utils::Time.extract_duration(@timeout),
    dataverse_name: @dataverse_name,
    ignore_if_does_not_exist: @ignore_if_does_not_exist,
  }
end