Class: Couchbase::Management::CreateCollectionSettings

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

Constant Summary collapse

DEFAULT =
CreateCollectionSettings.new.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_expiry: nil, history: nil) {|_self| ... } ⇒ CreateCollectionSettings

Returns a new instance of CreateCollectionSettings.

Yields:

  • (_self)

Yield Parameters:



438
439
440
441
442
443
# File 'lib/couchbase/management/collection_manager.rb', line 438

def initialize(max_expiry: nil, history: nil)
  @max_expiry = max_expiry
  @history = history

  yield self if block_given?
end

Instance Attribute Details

#historyBoolean?

default to the bucket-level setting)

Returns:

  • (Boolean, nil)

    whether history retention override should be enabled in the collection (set to nil to



436
437
438
# File 'lib/couchbase/management/collection_manager.rb', line 436

def history
  @history
end

#max_expiryInteger?

(set to nil to use the bucket-level setting, and to -1 set it to no-expiry)

Returns:

  • (Integer, nil)

    time in seconds of the maximum expiration time for new documents in the collection



432
433
434
# File 'lib/couchbase/management/collection_manager.rb', line 432

def max_expiry
  @max_expiry
end