DocumentClient.CreateStoredProcedureQuery メソッド

定義

オーバーロード

CreateStoredProcedureQuery(String, FeedOptions)

オーバーロードされます。 このメソッドは、Azure Cosmos DB サービスのコレクションの下にストアド プロシージャのクエリを作成します。 IOrderedQueryable{StoredProcedure} を返します。

CreateStoredProcedureQuery(Uri, FeedOptions)

Azure Cosmos DB サービスでストアド プロシージャのクエリを作成する拡張メソッド。

CreateStoredProcedureQuery(String, SqlQuerySpec, FeedOptions)

オーバーロードされます。 このメソッドは、パラメーター化された値を持つ SQL ステートメントを使用する SQL ステートメントを使用して、Azure Cosmos DB データベースのコレクションの下にストアド プロシージャのクエリを作成します。 IQueryable{dynamic} が返されます。 パラメーター化された値を使用した SQL ステートメントの準備の詳細については、 を参照してください SqlQuerySpec

CreateStoredProcedureQuery(String, String, FeedOptions)

オーバーロードされます。 このメソッドは、SQL ステートメントを使用して、Azure Cosmos DB データベースのコレクションの下にストアド プロシージャのクエリを作成します。 IQueryable{dynamic} が返されます。

CreateStoredProcedureQuery(Uri, SqlQuerySpec, FeedOptions)

Azure Cosmos DB サービスでストアド プロシージャのクエリを作成する拡張メソッド。

CreateStoredProcedureQuery(Uri, String, FeedOptions)

Azure Cosmos DB サービスでストアド プロシージャのクエリを作成する拡張メソッド。

CreateStoredProcedureQuery(String, FeedOptions)

オーバーロードされます。 このメソッドは、Azure Cosmos DB サービスのコレクションの下にストアド プロシージャのクエリを作成します。 IOrderedQueryable{StoredProcedure} を返します。

public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.StoredProcedure> CreateStoredProcedureQuery (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateStoredProcedureQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.StoredProcedure>
override this.CreateStoredProcedureQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.StoredProcedure>
Public Function CreateStoredProcedureQuery (collectionLink As String, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of StoredProcedure)

パラメーター

collectionLink
String

親コレクション リソースへのリンク。

feedOptions
FeedOptions

クエリ結果フィードを処理するためのオプション。 詳細については、FeedOptions を参照してください

戻り値

指定された SQL ステートメントを使用してクエリを評価できる IOrderedQueryable{StoredProcedure}。

実装

次の例では、ID によるストアド プロシージャのクエリを実行します。

StoredProcedure storedProcedure = client.CreateStoredProcedureQuery(collectionLink).Where(c => c.Id == "helloWorld").AsEnumerable().FirstOrDefault();

こちらもご覧ください

適用対象

CreateStoredProcedureQuery(Uri, FeedOptions)

Azure Cosmos DB サービスでストアド プロシージャのクエリを作成する拡張メソッド。

public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.StoredProcedure> CreateStoredProcedureQuery (Uri storedProceduresUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateStoredProcedureQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.StoredProcedure>
override this.CreateStoredProcedureQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.StoredProcedure>
Public Function CreateStoredProcedureQuery (storedProceduresUri As Uri, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of StoredProcedure)

パラメーター

storedProceduresUri
Uri

ストアド プロシージャへの URI。

feedOptions
FeedOptions

クエリ結果フィードを処理するためのオプション。

戻り値

クエリ結果セット。

実装

適用対象

CreateStoredProcedureQuery(String, SqlQuerySpec, FeedOptions)

オーバーロードされます。 このメソッドは、パラメーター化された値を持つ SQL ステートメントを使用する SQL ステートメントを使用して、Azure Cosmos DB データベースのコレクションの下にストアド プロシージャのクエリを作成します。 IQueryable{dynamic} が返されます。 パラメーター化された値を使用した SQL ステートメントの準備の詳細については、 を参照してください SqlQuerySpec

public System.Linq.IQueryable<dynamic> CreateStoredProcedureQuery (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateStoredProcedureQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateStoredProcedureQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateStoredProcedureQuery (collectionLink As String, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

パラメーター

collectionLink
String

親コレクション リソースへのリンク。

querySpec
SqlQuerySpec

SQL 式を含む SqlQuerySpec インスタンス。

feedOptions
FeedOptions

クエリ結果フィードを処理するためのオプション。 詳細については、FeedOptions を参照してください

戻り値

指定された SQL ステートメントを使用してクエリを評価できる IQueryable{dynamic}。

実装

次の例では、ID によるストアド プロシージャのクエリを実行します。

var query = new SqlQuerySpec("SELECT * FROM sprocs s WHERE s.id = @id", new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@id", Value = "HelloWorld" }}));
StoredProcedure storedProcedure = client.CreateStoredProcedureQuery(collectionLink, query).AsEnumerable().FirstOrDefault();

注釈

構文と例については、 https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started/ を参照してください。

こちらもご覧ください

適用対象

CreateStoredProcedureQuery(String, String, FeedOptions)

オーバーロードされます。 このメソッドは、SQL ステートメントを使用して、Azure Cosmos DB データベースのコレクションの下にストアド プロシージャのクエリを作成します。 IQueryable{dynamic} が返されます。

public System.Linq.IQueryable<dynamic> CreateStoredProcedureQuery (string collectionLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateStoredProcedureQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateStoredProcedureQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateStoredProcedureQuery (collectionLink As String, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

パラメーター

collectionLink
String

親コレクション リソースへのリンク。

sqlExpression
String

SQL ステートメント。

feedOptions
FeedOptions

クエリ結果フィードを処理するためのオプション。 詳細については、FeedOptions を参照してください

戻り値

指定された SQL ステートメントを使用してクエリを評価できる IQueryable{dynamic}。

実装

次の例では、ID によるストアド プロシージャのクエリを実行します。

StoredProcedure storedProcedure = client.CreateStoredProcedureQuery(collectionLink, "SELECT * FROM sprocs s WHERE s.id = 'HelloWorld'").AsEnumerable().FirstOrDefault();

注釈

構文と例については、 https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started/ を参照してください。

こちらもご覧ください

適用対象

CreateStoredProcedureQuery(Uri, SqlQuerySpec, FeedOptions)

Azure Cosmos DB サービスでストアド プロシージャのクエリを作成する拡張メソッド。

public System.Linq.IQueryable<dynamic> CreateStoredProcedureQuery (Uri storedProceduresUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateStoredProcedureQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateStoredProcedureQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateStoredProcedureQuery (storedProceduresUri As Uri, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

パラメーター

storedProceduresUri
Uri

ストアド プロシージャへの URI。

querySpec
SqlQuerySpec

SQL クエリ。

feedOptions
FeedOptions

クエリ結果フィードを処理するためのオプション。

戻り値

クエリ結果セット。

実装

適用対象

CreateStoredProcedureQuery(Uri, String, FeedOptions)

Azure Cosmos DB サービスでストアド プロシージャのクエリを作成する拡張メソッド。

public System.Linq.IQueryable<dynamic> CreateStoredProcedureQuery (Uri storedProceduresUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateStoredProcedureQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateStoredProcedureQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateStoredProcedureQuery (storedProceduresUri As Uri, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

パラメーター

storedProceduresUri
Uri

ストアド プロシージャへの URI。

sqlExpression
String

SQL クエリ。

feedOptions
FeedOptions

クエリ結果フィードを処理するためのオプション。

戻り値

クエリ結果セット。

実装

適用対象