Interface IDynamoTableQuery<TRecord>
Interface to specify Query operation.
Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTableQuery<TRecord>
where TRecord : class
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
Methods
ExecuteAsync(Boolean, CancellationToken)
Execute Query operation.
Declaration
Task<IEnumerable<TRecord>> ExecuteAsync(bool fetchAllAttributes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
fetchAllAttributes | Fetch all attributes from main index when querying a local/global secondary index. |
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
List of all found records. |
ExecuteAsync(CancellationToken)
Execute Query operation.
Declaration
virtual Task<IEnumerable<TRecord>> ExecuteAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
List of all found records. |
ExecuteAsyncEnumerable(Boolean, CancellationToken)
Execute Query operation.
Declaration
IAsyncEnumerable<TRecord> ExecuteAsyncEnumerable(bool fetchAllAttributes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
fetchAllAttributes | Fetch all attributes from main index when querying a local/global secondary index. |
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
Asynchronous enumerable which returns found records. |
ExecuteAsyncEnumerable(CancellationToken)
Execute Query operation.
Declaration
virtual IAsyncEnumerable<TRecord> ExecuteAsyncEnumerable(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
Asynchronous enumerable which returns found records. |
ExecuteFetchAllAttributesAsync(CancellationToken)
Execute Query operation and fetch all attributes from main index when querying a local/global secondary index.
Declaration
virtual Task<IEnumerable<TRecord>> ExecuteFetchAllAttributesAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
List of all found records. |
ExecuteFetchAllAttributesAsyncEnumerable(CancellationToken)
Execute Query operation and fetch all attributes from main index when querying a local/global secondary index.
Declaration
virtual IAsyncEnumerable<TRecord> ExecuteFetchAllAttributesAsyncEnumerable(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
Asynchronous enumerable which returns found records. |
Get<T>(Expression<Func<TRecord, T>>)
Selects a record property to fetch.
Declaration
IDynamoTableQuery<TRecord> Get<T>(Expression<Func<TRecord, T>> attribute)
Parameters
Type | Name | Description |
---|---|---|
System. |
attribute | A lambda expression that returns the record property. |
Returns
Type | Description |
---|---|
IDynamo |
Type Parameters
Name | Description |
---|---|
T | The property type. |
Where(Expression<Func<TRecord, Boolean>>)
Filter query results.
Declaration
IDynamoTableQuery<TRecord> Where(Expression<Func<TRecord, bool>> filter)
Parameters
Type | Name | Description |
---|---|---|
System. |
filter | A lambda predicate representing the DynamoDB filter expression. |
Returns
Type | Description |
---|---|
IDynamo |