IDocumentClient.CreateAttachmentQuery メソッド

定義

オーバーロード

CreateAttachmentQuery(Uri, SqlQuerySpec, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

CreateAttachmentQuery(String, String, FeedOptions)

オーバーロードされます。 このメソッドは、SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。 IQueryable{dynamic} を返します。

CreateAttachmentQuery(Uri, String, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

CreateAttachmentQuery(Uri, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

CreateAttachmentQuery(String, FeedOptions)

オーバーロードされます。 このメソッドは、Azure Cosmos DB サービスに添付ファイルのクエリを作成します。 IOrderedQueryable{Attachment} を返します。

CreateAttachmentQuery(String, SqlQuerySpec, FeedOptions)

オーバーロードされます。 このメソッドは、パラメーター化された値を持つ SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。 IQueryable{dynamic} を返します。 パラメーター化された値を使用した SQL ステートメントの準備の詳細については、 を参照してください SqlQuerySpec

CreateAttachmentQuery<T>(String, FeedOptions)

オーバーロードされます。 このメソッドは、Azure Cosmos DB サービスに添付ファイルのクエリを作成します。

CreateAttachmentQuery<T>(Uri, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

CreateAttachmentQuery<T>(String, SqlQuerySpec, FeedOptions)

オーバーロードされます。 このメソッドは、パラメーター化された値を持つ SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。 パラメーター化された値を使用した SQL ステートメントの準備の詳細については、 を参照してください SqlQuerySpec

CreateAttachmentQuery<T>(String, String, FeedOptions)

オーバーロードされます。 このメソッドは、SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。

CreateAttachmentQuery<T>(Uri, SqlQuerySpec, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

CreateAttachmentQuery<T>(Uri, String, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

CreateAttachmentQuery(Uri, SqlQuerySpec, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

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

パラメーター

documentUri
Uri

親ドキュメントの URI。

querySpec
SqlQuerySpec

sql クエリ。

feedOptions
FeedOptions

(省略可能) FeedOptions クエリ結果フィードを処理するための 。

戻り値

クエリ結果セット。

適用対象

CreateAttachmentQuery(String, String, FeedOptions)

オーバーロードされます。 このメソッドは、SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。 IQueryable{dynamic} を返します。

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

パラメーター

documentLink
String

親ドキュメントへのリンク。

sqlExpression
String

SQL ステートメント。

feedOptions
FeedOptions

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

戻り値

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

foreach (Attachment attachment in client.CreateAttachmentQuery<dynamic>(
    document.SelfLink, 
    "SELECT * FROM attachments a WHERE a.priority = 0"))
{
    Console.WriteLine("Id: {0}, Priority:{1}", attachment.id, attachment.priority);
}

注釈

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

こちらもご覧ください

適用対象

CreateAttachmentQuery(Uri, String, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

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

パラメーター

documentUri
Uri

親ドキュメントの URI。

sqlExpression
String

sql クエリ。

feedOptions
FeedOptions

(省略可能) FeedOptions クエリ結果フィードを処理するための 。

戻り値

クエリ結果セット。

適用対象

CreateAttachmentQuery(Uri, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Attachment> CreateAttachmentQuery (Uri documentUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Attachment>
Public Function CreateAttachmentQuery (documentUri As Uri, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of Attachment)

パラメーター

documentUri
Uri

親ドキュメントの URI。

feedOptions
FeedOptions

(省略可能) FeedOptions クエリ結果フィードを処理するための 。

戻り値

クエリ結果セット。

適用対象

CreateAttachmentQuery(String, FeedOptions)

オーバーロードされます。 このメソッドは、Azure Cosmos DB サービスに添付ファイルのクエリを作成します。 IOrderedQueryable{Attachment} を返します。

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

パラメーター

documentLink
String

親ドキュメントへのリンク

feedOptions
FeedOptions

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

戻り値

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

次の例では、LINQ を使用してプレーン テキスト添付ファイルのクエリを実行します。

foreach (Attachment attachment in client.CreateAttachmentQuery(document.SelfLink).Where(a => a.ContentType == "text/plain"))
{
    Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}

こちらもご覧ください

適用対象

CreateAttachmentQuery(String, SqlQuerySpec, FeedOptions)

オーバーロードされます。 このメソッドは、パラメーター化された値を持つ SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。 IQueryable{dynamic} を返します。 パラメーター化された値を使用した SQL ステートメントの準備の詳細については、 を参照してください SqlQuerySpec

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

パラメーター

documentLink
String

親ドキュメント リソースへのリンク。

querySpec
SqlQuerySpec

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

feedOptions
FeedOptions

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

戻り値

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

次の例では、パラメーター化された SQL クエリ文字列を使用してプレーン テキスト添付ファイルをクエリします。

var query = new SqlQuerySpec(
    "SELECT * FROM attachments a WHERE a.priority = @priority", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@priority", Value = 0 } }));

foreach (dynamic attachment in client.CreateAttachmentQuery<dynamic>(document.SelfLink, query))
{
    Console.WriteLine("Id: {0}, Priority:{1}", attachment.id, attachment.priority);
}

注釈

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

こちらもご覧ください

適用対象

CreateAttachmentQuery<T>(String, FeedOptions)

オーバーロードされます。 このメソッドは、Azure Cosmos DB サービスに添付ファイルのクエリを作成します。

public System.Linq.IOrderedQueryable<T> CreateAttachmentQuery<T> (string documentLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<'T>
Public Function CreateAttachmentQuery(Of T) (documentLink As String, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of T)

型パラメーター

T

クエリを実行するオブジェクトの型。

パラメーター

documentLink
String

親ドキュメントのリンク。

feedOptions
FeedOptions

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

戻り値

クエリを評価できる IOrderedQueryable{T}。

次の例では、カスタム型の添付ファイルに対するクエリを実行します。

public class PriorityAttachment : Attachment
{
    [JsonProperty("priority")]
    public int Priority;
}

foreach (PriorityAttachment attachment in 
    client.CreateAttachmentQuery<PriorityAttachment>(document.SelfLink).Where(a => a.Priority == 0))
{
    Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}

こちらもご覧ください

適用対象

CreateAttachmentQuery<T>(Uri, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

public System.Linq.IOrderedQueryable<T> CreateAttachmentQuery<T> (Uri documentUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<'T>
Public Function CreateAttachmentQuery(Of T) (documentUri As Uri, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of T)

型パラメーター

T

クエリを実行するオブジェクトの型。

パラメーター

documentUri
Uri

親ドキュメントの URI。

feedOptions
FeedOptions

(省略可能) FeedOptions クエリ結果フィードを処理するための 。

戻り値

クエリ結果セット。

適用対象

CreateAttachmentQuery<T>(String, SqlQuerySpec, FeedOptions)

オーバーロードされます。 このメソッドは、パラメーター化された値を持つ SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。 パラメーター化された値を使用した SQL ステートメントの準備の詳細については、 を参照してください SqlQuerySpec

public System.Linq.IQueryable<T> CreateAttachmentQuery<T> (string documentLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateAttachmentQuery(Of T) (documentLink As String, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

型パラメーター

T

パラメーター

documentLink
String

親ドキュメントのリンク。

querySpec
SqlQuerySpec

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

feedOptions
FeedOptions

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

戻り値

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

次の例では、パラメーター化された SQL クエリ文字列を使用してプレーン テキスト添付ファイルをクエリします。

var query = new SqlQuerySpec(
    "SELECT * FROM attachments a WHERE a.contentType = @contentType", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@contentType", Value = "text/plain" } }));

foreach (Attachment attachment in client.CreateAttachmentQuery(document.SelfLink, query))
{
    Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}

注釈

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

こちらもご覧ください

適用対象

CreateAttachmentQuery<T>(String, String, FeedOptions)

オーバーロードされます。 このメソッドは、SQL ステートメントを使用して、Azure Cosmos DB サービス内の添付ファイルのクエリを作成します。

public System.Linq.IQueryable<T> CreateAttachmentQuery<T> (string documentLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateAttachmentQuery(Of T) (documentLink As String, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

型パラメーター

T

パラメーター

documentLink
String

親ドキュメントのリンク。

sqlExpression
String

SQL ステートメント。

feedOptions
FeedOptions

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

戻り値

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

次の例では、SQL クエリ文字列を使用してプレーン テキスト添付ファイルのクエリを実行します。

foreach (Attachment attachment in client.CreateAttachmentQuery(
    document.SelfLink, 
    "SELECT * FROM attachments a WHERE a.contentType = 'text/plain'"))
{
    Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}

注釈

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

こちらもご覧ください

適用対象

CreateAttachmentQuery<T>(Uri, SqlQuerySpec, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

public System.Linq.IQueryable<T> CreateAttachmentQuery<T> (Uri documentUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateAttachmentQuery(Of T) (documentUri As Uri, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

型パラメーター

T

パラメーター

documentUri
Uri

親ドキュメントの URI。

querySpec
SqlQuerySpec

sql クエリ。

feedOptions
FeedOptions

(省略可能) FeedOptions クエリ結果フィードを処理するための 。

戻り値

クエリ結果セット。

適用対象

CreateAttachmentQuery<T>(Uri, String, FeedOptions)

Azure Cosmos DB サービスで添付ファイルのクエリを作成するメソッド。

public System.Linq.IQueryable<T> CreateAttachmentQuery<T> (Uri documentUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateAttachmentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateAttachmentQuery(Of T) (documentUri As Uri, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

型パラメーター

T

パラメーター

documentUri
Uri

親ドキュメントの URI。

sqlExpression
String

sql クエリ。

feedOptions
FeedOptions

(省略可能) FeedOptions クエリ結果フィードを処理するための 。

戻り値

クエリ結果セット。

適用対象