Views
- class txcouchbase.management.views.ViewIndexManager(impl: TxViewIndexMgmtInterface)
Performs management operations on a bucket’s view design documents.
- drop_design_document(design_doc_name: str, namespace: DesignDocumentNamespace, options: DropDesignDocumentOptions | None = None, **kwargs: Unpack[DropDesignDocumentOptionsKwargs]) Deferred[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.
- get_all_design_documents(namespace: DesignDocumentNamespace, options: GetAllDesignDocumentsOptions | None = None, **kwargs: Unpack[GetAllDesignDocumentsOptionsKwargs]) Deferred[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:
Deferred[Iterable[
DesignDocument]]- Raises:
InvalidArgumentException – If the namespace is not given.
- get_design_document(design_doc_name: str, namespace: DesignDocumentNamespace, options: GetDesignDocumentOptions | None = None, **kwargs: Unpack[GetDesignDocumentOptionsKwargs]) Deferred[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:
Deferred[
DesignDocument]- Raises:
InvalidArgumentException – If the design_doc_name or namespace is not given.
DesignDocumentNotFoundException – If the design document does not exist.
- publish_design_document(design_doc_name: str, options: PublishDesignDocumentOptions | None = None, **kwargs: Unpack[PublishDesignDocumentOptionsKwargs]) Deferred[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.
- upsert_design_document(design_doc_data: DesignDocument, namespace: DesignDocumentNamespace, options: UpsertDesignDocumentOptions | None = None, **kwargs: Unpack[UpsertDesignDocumentOptionsKwargs]) Deferred[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: