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

Method collection

couchbase/bucket.py:91–102  ·  view source on GitHub ↗

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

(self, collection_name: str)

Source from the content-addressed store, hash-verified

89 return Scope(self, name)
90
91 def collection(self, collection_name: str) -> Collection:
92 """Creates a :class:`~couchbase.collection.Collection` instance of the specified collection.
93
94 Args:
95 collection_name (str): Name of the collection to reference.
96
97 Returns:
98 :class:`~couchbase.collection.Collection`: A :class:`~couchbase.collection.Collection` instance of the specified collection.
99
100 """ # noqa: E501
101 scope = self.default_scope()
102 return scope.collection(collection_name)
103
104 def default_collection(self) -> Collection:
105 """Creates a :class:`~couchbase.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