MCPcopy Create free account
hub / github.com/couchbase/couchbase-python-client / collection

Method collection

acouchbase/bucket.py:102–113  ·  view source on GitHub ↗

Creates a :class:`~acouchbase.collection.Collection` instance of the specified collection. Args: collection_name (str): Name of the collection to reference. Returns: :class:`~acouchbase.collection.Collection`: A :class:`~acouchbase.collection.Collection` ins

(self, collection_name: str)

Source from the content-addressed store, hash-verified

100 return Scope(self, name)
101
102 def collection(self, collection_name: str) -> Collection:
103 """Creates a :class:`~acouchbase.collection.Collection` instance of the specified collection.
104
105 Args:
106 collection_name (str): Name of the collection to reference.
107
108 Returns:
109 :class:`~acouchbase.collection.Collection`: A :class:`~acouchbase.collection.Collection` instance of the specified collection.
110
111 """ # noqa: E501
112 scope = self.default_scope()
113 return scope.collection(collection_name)
114
115 def default_collection(self):
116 """Creates a :class:`~acouchbase.collection.Collection` instance of the default collection.

Callers 1

default_collectionMethod · 0.45

Calls 1

default_scopeMethod · 0.95

Tested by

no test coverage detected