Interface IPartitionConfigurator<T>
Configures partitions to be executed upon for batch operations.
Namespace: Gossip.Connection.Fluent
Assembly: Gossip.dll
Syntax
public interface IPartitionConfigurator<out T>
Type Parameters
| Name | Description |
|---|---|
| T | The batch parameter data type. |
Methods
| Improve this Doc View SourceExecute()
Execute synchronously the configured batched operation.
Declaration
IEnumerable<int> Execute()
Returns
| Type | Description |
|---|---|
| IEnumerable<Int32> | An |
ExecuteAsync()
Execute asynchronously the configured batched operation.
Declaration
Task<IEnumerable<int>> ExecuteAsync()
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<Int32>> | An |
Query<TResult>()
Query synchronously for the results of the configured batch operation.
Declaration
IEnumerable<TResult> Query<TResult>()
Returns
| Type | Description |
|---|---|
| IEnumerable<TResult> | An |
Type Parameters
| Name | Description |
|---|---|
| TResult |
QueryAsync<TResult>()
Query asynchronously for the results of the configured batch operation.
Declaration
Task<IEnumerable<TResult>> QueryAsync<TResult>()
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TResult>> | An |
Type Parameters
| Name | Description |
|---|---|
| TResult | The data type of the expected result. |
WithBatchParam(Func<IEnumerable<T>, Object>)
Convert batched objects to sql parameter @batchParam.
Declaration
IPartitionConfigurator<T> WithBatchParam(Func<IEnumerable<T>, object> func)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<IEnumerable<T>, Object> | func | A batch of the objects to be batched. Function should return sql that replaces @batchParam. |
Returns
| Type | Description |
|---|---|
| IPartitionConfigurator<T> |
WithBatchParamAsJsonArray()
The parameter to configure batched queries from.
Declaration
IPartitionConfigurator<T> WithBatchParamAsJsonArray()
Returns
| Type | Description |
|---|---|
| IPartitionConfigurator<T> |
WithBatchSize(Int32)
Configure the batch size for the operation.
Declaration
IPartitionConfigurator<T> WithBatchSize(int batchSize = 10000)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | batchSize | The batch size to use for the operation. |
Returns
| Type | Description |
|---|---|
| IPartitionConfigurator<T> |