AsyncCluster Overloads

AsyncCluster

Important

Not all class methods are listed. Only methods that allow overloads.

class acouchbase_analytics.cluster.AsyncCluster
execute_query(statement: str) Awaitable[AsyncQueryResult]
execute_query(statement: str, options: QueryOptions) Awaitable[AsyncQueryResult]
execute_query(statement: str, **kwargs: QueryOptionsKwargs) Awaitable[AsyncQueryResult]
execute_query(statement: str, options: QueryOptions, **kwargs: QueryOptionsKwargs) Awaitable[AsyncQueryResult]
execute_query(statement: str, options: QueryOptions, *args: JSONType, **kwargs: QueryOptionsKwargs) Awaitable[AsyncQueryResult]
execute_query(statement: str, options: QueryOptions, *args: JSONType, **kwargs: str) Awaitable[AsyncQueryResult]
execute_query(statement: str, *args: JSONType, **kwargs: str) Awaitable[AsyncQueryResult]

Executes a query against a Capella analytics cluster.

Important

The cancel API is VOLATILE and is subject to change at any time.

Parameters:
  • statement (str) – The SQL++ statement to execute.

  • options (Optional[QueryOptions]) – Options to set for the query.

  • *args (Optional[JSONType]) – Can be used to pass in positional query placeholders.

  • **kwargs (Optional[Union[QueryOptionsKwargs, str]]) – Keyword arguments that can be used in place or to overrride provided ClusterOptions. Can also be used to pass in named query placeholders.

Returns:

An Awaitable is returned. Once the Awaitable completes, an instance of a AsyncQueryResult will be available.

Return type:

Awaitable[AsyncQueryResult]

classmethod create_instance(endpoint: str, credential: Credential) AsyncCluster
classmethod create_instance(endpoint: str, credential: Credential, options: ClusterOptions) AsyncCluster
classmethod create_instance(endpoint: str, credential: Credential, **kwargs: ClusterOptionsKwargs) AsyncCluster
classmethod create_instance(endpoint: str, credential: Credential, options: ClusterOptions, **kwargs: ClusterOptionsKwargs) AsyncCluster

Create a Cluster instance

Important

The appropriate port needs to be specified. The SDK’s default ports are 80 (http) and 443 (https). If attempting to connect to Capella, the correct ports are most likely to be 8095 (http) and 18095 (https).

Capella example: https://cb.2xg3vwszqgqcrsix.cloud.couchbase.com:18095

Parameters:
  • endpoint (str) – The endpoint to use for sending HTTP requests to the Analytics server. The format of the endpoint string is the scheme (http or https is required, use https for TLS enabled connections), followed a hostname and optional port.

  • credential (Credential) – The user credentials.

  • options (Optional[ClusterOptions]) – Global options to set for the cluster. Some operations allow the global options to be overriden by passing in options to the operation.

  • **kwargs (Optional[ClusterOptionsKwargs]) – Keyword arguments that can be used in place or to overrride provided ClusterOptions

Returns:

An Analytics AsyncCluster instance.

Return type:

AsyncCluster

Raises:
  • ValueError – If incorrect endpoint is provided.

  • ValueError – If incorrect options are provided.