QueryIterable Class

Represents an iterable object of the query results. QueryIterable is a wrapper for query execution context.

Inheritance
builtins.object
QueryIterable

Constructor

QueryIterable(client, query, options, fetch_function, collection_link=None)

Parameters

client
query
options
fetch_function
collection_link
default value: None

Methods

PartitioningQueryIterable

Represents a client side partitioning query iterable.

This constructor instantiates a QueryIterable for client side partitioning queries, and sets _MultiCollectionQueryExecutionContext as the internal execution context.

fetch_next_block

Returns a block of results with respecting retry policy.

This method only exists for backward compatibility reasons. (Because QueryIterable has exposed fetch_next_block api).

PartitioningQueryIterable

Represents a client side partitioning query iterable.

This constructor instantiates a QueryIterable for client side partitioning queries, and sets _MultiCollectionQueryExecutionContext as the internal execution context.

PartitioningQueryIterable(client, query, options, database_link, partition_key)

Parameters

client
CosmosClient
Required

Instance of document client

or dict) options
(str
Required
options
dict
Required

The request options for the request.

database_link
str
Required

Database self link or ID based link

partition_key
str
Required

Partition key for the query

partition_key
Required

fetch_next_block

Returns a block of results with respecting retry policy.

This method only exists for backward compatibility reasons. (Because QueryIterable has exposed fetch_next_block api).

fetch_next_block()

Returns

List of results.

Return type