Views
- class acouchbase.management.views.ViewIndexManager(impl: AsyncViewIndexMgmtInterface)
Performs management operations on a bucket’s view design documents.
- async drop_design_document(design_doc_name: str, namespace: DesignDocumentNamespace, options: DropDesignDocumentOptions | None = None, **kwargs: Unpack[DropDesignDocumentOptionsKwargs]) None
Drops an existing design document.
- Parameters:
design_doc_name (str) – The name of the design document.
namespace (
DesignDocumentNamespace) – Whether the design document is in development or production.options (
DropDesignDocumentOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
InvalidArgumentException – If the design_doc_name or namespace is not given.
DesignDocumentNotFoundException – If the design document does not exist.
- async get_all_design_documents(namespace: DesignDocumentNamespace, options: GetAllDesignDocumentsOptions | None = None, **kwargs: Unpack[GetAllDesignDocumentsOptionsKwargs]) Iterable[DesignDocument]
Returns every design document in a namespace.
- Parameters:
namespace (
DesignDocumentNamespace) – Whether the design document is in development or production.options (
GetAllDesignDocumentsOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The design documents.
- Return type:
Awaitable[Iterable[
DesignDocument]]- Raises:
InvalidArgumentException – If the namespace is not given.
- async get_design_document(design_doc_name: str, namespace: DesignDocumentNamespace, options: GetDesignDocumentOptions | None = None, **kwargs: Unpack[GetDesignDocumentOptionsKwargs]) DesignDocument
Returns a design document.
- Parameters:
design_doc_name (str) – The name of the design document.
namespace (
DesignDocumentNamespace) – Whether the design document is in development or production.options (
GetDesignDocumentOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The design document.
- Return type:
Awaitable[
DesignDocument]- Raises:
InvalidArgumentException – If the design_doc_name or namespace is not given.
DesignDocumentNotFoundException – If the design document does not exist.
- async publish_design_document(design_doc_name: str, options: PublishDesignDocumentOptions | None = None, **kwargs: Unpack[PublishDesignDocumentOptionsKwargs]) None
Copies a design document from the development namespace to production.
The copy is a get followed by an upsert, and the timeout covers both.
- Parameters:
design_doc_name (str) – The name of the development design document to publish.
options (
PublishDesignDocumentOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
InvalidArgumentException – If the design_doc_name is not given.
DesignDocumentNotFoundException – If the design document does not exist in the development namespace.
- async upsert_design_document(design_doc_data: DesignDocument, namespace: DesignDocumentNamespace, options: UpsertDesignDocumentOptions | None = None, **kwargs: Unpack[UpsertDesignDocumentOptionsKwargs]) None
Creates a design document, or replaces one of the same name.
- Parameters:
design_doc_data (
DesignDocument) – The design document to create or replace.namespace (
DesignDocumentNamespace) – Whether the design document is in development or production.options (
UpsertDesignDocumentOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
InvalidArgumentException – If the design_doc_data or namespace is not given.
This module also publishes these, described where they are first documented: