共用方式為


QueryDefinition(String) Constructor

Definition

Create a QueryDefinition

public QueryDefinition (string query);
new Microsoft.Azure.Cosmos.QueryDefinition : string -> Microsoft.Azure.Cosmos.QueryDefinition
Public Sub New (query As String)

Parameters

query
String

A valid Cosmos SQL query "Select * from test t"

Examples

QueryDefinition query = new QueryDefinition(
    "select * from t where t.Account = @account")
    .WithParameter("@account", "12345");

Applies to