Scope Overloads

Scope

Important

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

class couchbase_analytics.scope.Scope
execute_query(statement: str) → BlockingQueryResult
execute_query(statement: str, options: QueryOptions) → BlockingQueryResult
execute_query(statement: str, **kwargs: QueryOptionsKwargs) → BlockingQueryResult
execute_query(statement: str, options: QueryOptions, **kwargs: QueryOptionsKwargs) → BlockingQueryResult
execute_query(statement: str, options: QueryOptions, *args: JSONType, **kwargs: QueryOptionsKwargs) → BlockingQueryResult
execute_query(statement: str, options: QueryOptions, *args: JSONType, **kwargs: str) → BlockingQueryResult
execute_query(statement: str, *args: JSONType, **kwargs: str) → BlockingQueryResult
execute_query(statement: str, enable_cancel: bool) → Future[BlockingQueryResult]
execute_query(statement: str, enable_cancel: bool, *args: JSONType) → Future[BlockingQueryResult]
execute_query(statement: str, options: QueryOptions, enable_cancel: bool) → Future[BlockingQueryResult]
execute_query(statement: str, enable_cancel: bool, **kwargs: QueryOptionsKwargs) → Future[BlockingQueryResult]
execute_query(statement: str, options: QueryOptions, enable_cancel: bool, **kwargs: QueryOptionsKwargs) → Future[BlockingQueryResult]
execute_query(statement: str, options: QueryOptions, enable_cancel: bool, *args: JSONType, **kwargs: QueryOptionsKwargs) → Future[BlockingQueryResult]
execute_query(statement: str, options: QueryOptions, *args: JSONType, enable_cancel: bool, **kwargs: QueryOptionsKwargs) → Future[BlockingQueryResult]
execute_query(statement: str, options: QueryOptions, enable_cancel: bool, *args: JSONType, **kwargs: str) → Future[BlockingQueryResult]
execute_query(statement: str, options: QueryOptions, *args: JSONType, enable_cancel: bool, **kwargs: str) → Future[BlockingQueryResult]
execute_query(statement: str, enable_cancel: bool, *args: JSONType, **kwargs: str) → Future[BlockingQueryResult]
execute_query(statement: str, *args: JSONType, enable_cancel: bool, **kwargs: str) → Future[BlockingQueryResult]

Executes a query against an Analytics scope.

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.

  • enable_cancel (Optional[bool]) – Enable cancellation of the result or results stream.

  • *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 instance of BlockingQueryResult. When a cancel token is provided a Future is returned. Once the Future completes, an instance of a BlockingQueryResult will be available.

Return type:

Union[Future[BlockingQueryResult], BlockingQueryResult]

start_query(statement: str) → BlockingQueryHandle
start_query(statement: str, options: StartQueryOptions) → BlockingQueryHandle
start_query(statement: str, **kwargs: StartQueryOptionsKwargs) → BlockingQueryHandle
start_query(statement: str, options: StartQueryOptions, **kwargs: StartQueryOptionsKwargs) → BlockingQueryHandle
start_query(statement: str, options: StartQueryOptions, *args: JSONType, **kwargs: StartQueryOptionsKwargs) → BlockingQueryHandle
start_query(statement: str, options: StartQueryOptions, *args: JSONType, **kwargs: str) → BlockingQueryHandle
start_query(statement: str, *args: JSONType, **kwargs: str) → BlockingQueryHandle

Executes a query against an Analytics scope using the asynchronous server requests API.

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

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

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

Returns:

An instance of BlockingQueryHandle.

Return type:

BlockingQueryHandle