Class: Couchbase::Protostellar::Bucket Private

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/protostellar/bucket.rb

Overview

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

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, name) ⇒ Bucket

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.

Returns a new instance of Bucket.

API:

  • private



25
26
27
28
# File 'lib/couchbase/protostellar/bucket.rb', line 25

def initialize(client, name)
  @client = client
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

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.

API:

  • private



23
24
25
# File 'lib/couchbase/protostellar/bucket.rb', line 23

def name
  @name
end

Instance Method Details

#collection(name) ⇒ Object

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.

API:

  • private



34
35
36
# File 'lib/couchbase/protostellar/bucket.rb', line 34

def collection(name)
  default_scope.collection(name)
end

#collectionsObject

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.

API:

  • private



46
47
48
# File 'lib/couchbase/protostellar/bucket.rb', line 46

def collections
  Management::CollectionManager.new(client: @client, bucket_name: @name)
end

#default_collectionObject

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.

API:

  • private



42
43
44
# File 'lib/couchbase/protostellar/bucket.rb', line 42

def default_collection
  default_scope.collection("_default")
end

#default_scopeObject

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.

API:

  • private



38
39
40
# File 'lib/couchbase/protostellar/bucket.rb', line 38

def default_scope
  Scope.new(@client, @name, "_default")
end

#ping(_options = Options::Ping::DEFAULT) ⇒ Object

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.

Raises:

API:

  • private



50
51
52
# File 'lib/couchbase/protostellar/bucket.rb', line 50

def ping(_options = Options::Ping::DEFAULT)
  raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping"
end

#scope(name) ⇒ Object

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.

API:

  • private



30
31
32
# File 'lib/couchbase/protostellar/bucket.rb', line 30

def scope(name)
  Scope.new(@client, @name, name)
end