CosmosScripts.GetStoredProcedureQueryStreamIterator Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetStoredProcedureQueryStreamIterator(QueryDefinition, String, QueryRequestOptions, CancellationToken) |
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator. For more information on preparing SQL statements with parameterized values, please see QueryDefinition overload. |
GetStoredProcedureQueryStreamIterator(String, String, QueryRequestOptions, CancellationToken) |
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator. For more information on preparing SQL statements with parameterized values, please see QueryDefinition overload. |
GetStoredProcedureQueryStreamIterator(QueryDefinition, String, QueryRequestOptions, CancellationToken)
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator. For more information on preparing SQL statements with parameterized values, please see QueryDefinition overload.
public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetStoredProcedureQueryStreamIterator (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetStoredProcedureQueryStreamIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>
Public MustOverride Function GetStoredProcedureQueryStreamIterator (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)
Parameters
- queryDefinition
- QueryDefinition
The cosmos SQL query definition.
- continuationToken
- String
(Optional) The continuation token in the Azure Cosmos DB service.
- requestOptions
- QueryRequestOptions
(Optional) The options for the item query request QueryRequestOptions
- cancellationToken
- CancellationToken
(Optional) CancellationToken representing request cancellation.
Returns
An iterator to read through the existing stored procedures.
Examples
This create the stream feed iterator for sproc with queryDefinition as input.
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM s where s.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testSprocId");
IAsyncEnumerable<Response> iter = this.scripts.GetStoredProcedureQueryStreamIterator(queryDefinition);
Applies to
GetStoredProcedureQueryStreamIterator(String, String, QueryRequestOptions, CancellationToken)
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator. For more information on preparing SQL statements with parameterized values, please see QueryDefinition overload.
public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetStoredProcedureQueryStreamIterator (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetStoredProcedureQueryStreamIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>
Public MustOverride Function GetStoredProcedureQueryStreamIterator (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)
Parameters
- queryText
- String
The cosmos SQL query text.
- continuationToken
- String
(Optional) The continuation token in the Azure Cosmos DB service.
- requestOptions
- QueryRequestOptions
(Optional) The options for the item query request QueryRequestOptions
- cancellationToken
- CancellationToken
(Optional) CancellationToken representing request cancellation.
Returns
An iterator to read through the existing stored procedures.
Examples
This create the stream feed iterator for sproc with queryText as input.
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM s where s.id like '%testId%'";
IAsyncEnumerable<Response> iter = this.scripts.GetStoredProcedureQueryStreamIterator(queryText);