TableClient.Query Method

Definition

Overloads

Query<T>(String, Nullable<Int32>, IEnumerable<String>, CancellationToken)

Queries entities in the table.

Query<T>(Expression<Func<T,Boolean>>, Nullable<Int32>, IEnumerable<String>, CancellationToken)

Queries entities in the table.

Query<T>(String, Nullable<Int32>, IEnumerable<String>, CancellationToken)

Queries entities in the table.

public virtual Azure.Pageable<T> Query<T> (string filter = default, int? maxPerPage = default, System.Collections.Generic.IEnumerable<string> select = default, System.Threading.CancellationToken cancellationToken = default) where T : class, Azure.Data.Tables.ITableEntity, new();
abstract member Query : string * Nullable<int> * seq<string> * System.Threading.CancellationToken -> Azure.Pageable<'T (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))> (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))
override this.Query : string * Nullable<int> * seq<string> * System.Threading.CancellationToken -> Azure.Pageable<'T (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))> (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))
Public Overridable Function Query(Of T As {Class, ITableEntity, New}) (Optional filter As String = Nothing, Optional maxPerPage As Nullable(Of Integer) = Nothing, Optional select As IEnumerable(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of T)

Type Parameters

T

A custom model type that implements ITableEntity or an instance of TableEntity.

Parameters

filter
String

Returns only entities that satisfy the specified OData filter. For example, the following filter would filter entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'".

maxPerPage
Nullable<Int32>

The maximum number of entities that will be returned per page. Note: This value does not limit the total number of results if the result is fully enumerated.

select
IEnumerable<String>

An IEnumerable<T> of entity property names that selects which set of entity properties to return in the result set. For example, the following value would return only the PartitionKey and RowKey properties: new[] { "PartitionKey, RowKey"}.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Pageable<T>

A Pageable<T> containing a collection of entity models serialized as type T.

Exceptions

The server returned an error. See Message for details returned from the server.

Applies to

Query<T>(Expression<Func<T,Boolean>>, Nullable<Int32>, IEnumerable<String>, CancellationToken)

Queries entities in the table.

public virtual Azure.Pageable<T> Query<T> (System.Linq.Expressions.Expression<Func<T,bool>> filter, int? maxPerPage = default, System.Collections.Generic.IEnumerable<string> select = default, System.Threading.CancellationToken cancellationToken = default) where T : class, Azure.Data.Tables.ITableEntity, new();
abstract member Query : System.Linq.Expressions.Expression<Func<'T, bool>> * Nullable<int> * seq<string> * System.Threading.CancellationToken -> Azure.Pageable<'T (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))> (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))
override this.Query : System.Linq.Expressions.Expression<Func<'T, bool>> * Nullable<int> * seq<string> * System.Threading.CancellationToken -> Azure.Pageable<'T (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))> (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity and 'T : (new : unit -> 'T))
Public Overridable Function Query(Of T As {Class, ITableEntity, New}) (filter As Expression(Of Func(Of T, Boolean)), Optional maxPerPage As Nullable(Of Integer) = Nothing, Optional select As IEnumerable(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of T)

Type Parameters

T

A custom model type that implements ITableEntity or an instance of TableEntity.

Parameters

filter
Expression<Func<T,Boolean>>

Returns only entities that satisfy the specified filter expression. For example, the following expression would filter entities with a PartitionKey of 'foo': e => e.PartitionKey == "foo".

maxPerPage
Nullable<Int32>

The maximum number of entities that will be returned per page. Note: This value does not limit the total number of results if the result is fully enumerated.

select
IEnumerable<String>

An IEnumerable<T> of entity property names that selects which set of entity properties to return in the result set. For example, the following value would return only the PartitionKey and RowKey properties: new[] { "PartitionKey, RowKey"}.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Pageable<T>

A Pageable<T> containing a collection of entity models serialized as type T.

Exceptions

The server returned an error. See Message for details returned from the server.

Applies to