Interface IQueryExecutor
Executes configured queries.
Namespace: Gossip.Connection.Fluent
Assembly: Gossip.dll
Syntax
public interface IQueryExecutor
Methods
| Improve this Doc View SourceBatchedBy<T>(IEnumerable<T>)
Perform the query partitioned into batches on the partitionedBy parameter.
Declaration
IPartitionConfigurator<T> BatchedBy<T>(IEnumerable<T> partitionedBy)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | partitionedBy | The data to perform partitioned batch queries on. |
Returns
| Type | Description |
|---|---|
| IPartitionConfigurator<T> |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to perform partitioned batch queries on. |
Execute()
Synchronously execute the query.
Declaration
int Execute()
Returns
| Type | Description |
|---|---|
| Int32 | The number of rows impacted by the query. |
ExecuteAsync()
Asynchronously execute the query.
Declaration
Task<int> ExecuteAsync()
Returns
| Type | Description |
|---|---|
| Task<Int32> | The number of rows impacted by the query. |
ExecuteScalar<T>()
Synchronously execute the query and return a single value.
Declaration
T ExecuteScalar<T>()
Returns
| Type | Description |
|---|---|
| T | A single |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to return. |
ExecuteScalarAsync<T>()
Asynchronously execute the query and return a single value.
Declaration
Task<T> ExecuteScalarAsync<T>()
Returns
| Type | Description |
|---|---|
| Task<T> | A single |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to return. |
Query<T>()
Synchronously execute the query and return the results.
Declaration
IEnumerable<T> Query<T>()
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | The |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the returned values. |
QueryAsync<T>()
Asynchronously execute the query and return the results.
Declaration
Task<IEnumerable<T>> QueryAsync<T>()
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<T>> | The |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the returned values. |
QueryAsync<TFirst, TSecond, TReturn>(Func<TFirst, TSecond, TReturn>)
Perform an asynchronous multi-mapping query with 2 input types.
This returns a single type, combined from the raw types via mapping.
Declaration
Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TReturn>(Func<TFirst, TSecond, TReturn> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TFirst, TSecond, TReturn> | mapping | The function to map row types to the return type. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TReturn>> | An enumerable of |
Type Parameters
| Name | Description |
|---|---|
| TFirst | The first type in the recordset. |
| TSecond | The second type in the recordset. |
| TReturn | The combined type to return. |
QueryAsync<TFirst, TSecond, TThird, TReturn>(Func<TFirst, TSecond, TThird, TReturn>)
Perform an asynchronous multi-mapping query with 3 input types.
This returns a single type, combined from the raw types via mapping.
Declaration
Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TReturn>(Func<TFirst, TSecond, TThird, TReturn> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TFirst, TSecond, TThird, TReturn> | mapping | The function to map row types to the return type |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TReturn>> | An enumerable of |
Type Parameters
| Name | Description |
|---|---|
| TFirst | The first type in the recordset. |
| TSecond | The second type in the recordset. |
| TThird | The third type in the recordset. |
| TReturn | The combined type to return. |
QueryAsync<TFirst, TSecond, TThird, TFourth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TReturn>)
Perform an asynchronous multi-mapping query with 4 input types.
This returns a single type, combined from the raw types via mapping.
Declaration
Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TReturn> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TFirst, TSecond, TThird, TFourth, TReturn> | mapping | The function to map row types to the return type. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TReturn>> | An enumerable of |
Type Parameters
| Name | Description |
|---|---|
| TFirst | The first type in the recordset. |
| TSecond | The second type in the recordset. |
| TThird | The third type in the recordset. |
| TFourth | The fourth type in the recordset. |
| TReturn | The combined type to return. |
QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TReturn>)
Perform an asynchronous multi-mapping query with 5 input types.
This returns a single type, combined from the raw types via mapping.
Declaration
Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TReturn> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TFirst, TSecond, TThird, TFourth, TFifth, TReturn> | mapping | The function to map row types to the return type. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TReturn>> | An enumerable of |
Type Parameters
| Name | Description |
|---|---|
| TFirst | The first type in the recordset. |
| TSecond | The second type in the recordset. |
| TThird | The third type in the recordset. |
| TFourth | The fourth type in the recordset. |
| TFifth | The fifth type in the recordset. |
| TReturn | The combined type to return. |
QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn>)
Perform an asynchronous multi-mapping query with 6 input types.
This returns a single type, combined from the raw types via mapping.
Declaration
Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn> | mapping | The function to map row types to the return type. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TReturn>> | An enumerable of |
Type Parameters
| Name | Description |
|---|---|
| TFirst | The first type in the recordset. |
| TSecond | The second type in the recordset. |
| TThird | The third type in the recordset. |
| TFourth | The fourth type in the recordset. |
| TFifth | The fifth type in the recordset. |
| TSixth | The sixth type in the recordset. |
| TReturn | The combined type to return. |
QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn>)
Perform an asynchronous multi-mapping query with 7 input types.
This returns a single type, combined from the raw types via mapping.
Declaration
Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn> | mapping | The function to map row types to the return type. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TReturn>> | An enumerable of |
Type Parameters
| Name | Description |
|---|---|
| TFirst | The first type in the recordset. |
| TSecond | The second type in the recordset. |
| TThird | The third type in the recordset. |
| TFourth | The fourth type in the recordset. |
| TFifth | The fifth type in the recordset. |
| TSixth | The sixth type in the recordset. |
| TSeventh | The seventh type in the recordset. |
| TReturn | The combined type to return. |
QueryFirstOrDefault<T>()
Synchronously query for the first result, or the default value of
Declaration
T QueryFirstOrDefault<T>()
Returns
| Type | Description |
|---|---|
| T | The first result of the query, or the default value of |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the returned value. |
QueryFirstOrDefaultAsync<T>()
Asynchronously query for the first result, or the default value of
Declaration
Task<T> QueryFirstOrDefaultAsync<T>()
Returns
| Type | Description |
|---|---|
| Task<T> | The first result of the query, or the default value of |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the returned value. |
QuerySingleOrDefault<T>()
Synchronously query for a single result, or the default value of
Declaration
T QuerySingleOrDefault<T>()
Returns
| Type | Description |
|---|---|
| T | The result of the query, or the default value of |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the returned value. |
QuerySingleOrDefaultAsync<T>()
Asynchronously query for a single result, or the default value of
Declaration
Task<T> QuerySingleOrDefaultAsync<T>()
Returns
| Type | Description |
|---|---|
| Task<T> | The result of the query, or the default value of |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the returned value. |