Class SearchExtensions
Extensions of the Queryable Type for RedisCollections.
Inheritance
Inherited Members
Namespace: Redis.OM
Assembly: Redis.OM.dll
Syntax
public static class SearchExtensions
Methods
| Improve this Doc View SourceApply<T, TR>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TR>>, String)
Apply the provided expression to data in Redis.
Declaration
public static RedisAggregationSet<T> Apply<T, TR>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TR>> expression, string alias)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The Aggregation set. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TR>> | expression | The expression to apply. |
System.String | alias | The alias of the result. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | An Aggregation set. |
Type Parameters
Name | Description |
---|---|
T | Indexed type being applied to. |
TR | Type Yielded. |
Average<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Reduce the average of the provided field.
Declaration
public static GroupedAggregationSet<T> Average<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | GroupedAggregationSet with the reducer in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The field type to average. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Decimal>>)
Runs average reduction.
Declaration
public static async ValueTask<decimal> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, decimal>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Decimal>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Decimal> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Double>>)
Runs average reduction.
Declaration
public static async ValueTask<double> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, double>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Double>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Double> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Int32>>)
Runs average reduction.
Declaration
public static async ValueTask<double> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, int>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Int32>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Double> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Int64>>)
Runs average reduction.
Declaration
public static async ValueTask<double> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, long>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Int64>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Double> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Decimal>>>)
Runs average reduction.
Declaration
public static async ValueTask<decimal?> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, decimal?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Decimal>>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Decimal>> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Double>>>)
Runs average reduction.
Declaration
public static async ValueTask<double?> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, double?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Double>>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Double>> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Int32>>>)
Runs average reduction.
Declaration
public static async ValueTask<int?> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, int?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Int32>>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Int32>> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Int64>>>)
Runs average reduction.
Declaration
public static async ValueTask<long?> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, long?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Int64>>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Int64>> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Single>>>)
Runs average reduction.
Declaration
public static async ValueTask<float?> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, float?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Single>>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Single>> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
AverageAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Single>>)
Runs average reduction.
Declaration
public static async ValueTask<float> AverageAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, float>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Single>> | expression | The field expression to average. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Single> | The average. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
CloseGroup<T>(GroupedAggregationSet<T>)
Closes out the group and yields a regular RedisAggregationSet. Use this to flush reductions further down the pipeline.
Declaration
public static RedisAggregationSet<T> CloseGroup<T>(this GroupedAggregationSet<T> source)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | A RedisAggregationSet with the current pipeline preserved. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Count<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Boolean>>)
Count the instances where the expression is true.
Declaration
public static int Count<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, bool>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Boolean>> | expression | The expression to apply. |
Returns
Type | Description |
---|---|
System.Int32 | The Count. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
CountDistinct<T, TCount>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TCount>>)
Counts distinct elements matching the expression.
Declaration
public static GroupedAggregationSet<T> CountDistinct<T, TCount>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TCount>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TCount>> | expression | The expression to count. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The count of distinct elements. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TCount | The result type to count. |
CountDistinct<T, TCount>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TCount>>)
Counts distinct elements matching the expression.
Declaration
public static long CountDistinct<T, TCount>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TCount>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TCount>> | expression | The expression to count. |
Returns
Type | Description |
---|---|
System.Int64 | The count of distinct elements. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TCount | The result type to count. |
CountDistinctAsync<T, TCount>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TCount>>)
Approximate count of distinct elements matching the expression.
Declaration
public static async ValueTask<long> CountDistinctAsync<T, TCount>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TCount>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TCount>> | expression | The expression to count. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Int64> | The count of distinct elements. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TCount | The result type to count. |
CountDistinctish<T, TCount>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TCount>>)
Approximate count of distinct elements matching the expression.
Declaration
public static GroupedAggregationSet<T> CountDistinctish<T, TCount>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TCount>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TCount>> | expression | The expression to count. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The count of distinct elements. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TCount | The result type to count. |
CountDistinctish<T, TField>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Retrieves an approximate distinct count of the provided field.
Declaration
public static long CountDistinctish<T, TField>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
System.Int64 | An approximate count. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The type the field is being taken from. |
CountDistinctishAsync<T, TField>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Retrieves an approximate distinct count of the provided field.
Declaration
public static async ValueTask<long> CountDistinctishAsync<T, TField>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Int64> | An approximate count. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The type the field is being taken from. |
Distinct<T, TResult>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>)
Gets distinct element for the given field.
Declaration
public static GroupedAggregationSet<T> Distinct<T, TResult>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | Aggregation set. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression containing the field to get distinct fields for. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | An AggregationSet with the expression in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed Type. |
TResult | The type that you are retrieving. |
Distinct<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>)
Gets distinct element for the given field.
Declaration
public static RedisAggregationSet<T> Distinct<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | Aggregation set. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression containing the field to get distinct fields for. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | An AggregationSet with the expression in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed Type. |
TResult | The type that you are retrieving. |
Filter<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Boolean>>)
Filters results based off of expression.
Declaration
public static RedisAggregationSet<T> Filter<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, bool>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | AggregationSet to be filtered. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Boolean>> | expression | The Expression to apply as the filter. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | An aggregation set with the expression in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type to act on. |
First<T>(RedisAggregationSet<T>)
Get's the first element from Redis.
Declaration
public static AggregationResult<T> First<T>(this RedisAggregationSet<T> source)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
Returns
Type | Description |
---|---|
AggregationResult<T> | A single result. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
FirstAsync<T>(RedisAggregationSet<T>)
Get's the first element from Redis.
Declaration
public static async ValueTask<AggregationResult<T>> FirstAsync<T>(this RedisAggregationSet<T> source)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<AggregationResult<T>> | A single result. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
FirstOrDefault<T>(RedisAggregationSet<T>)
Get's the first element from Redis.
Declaration
public static AggregationResult<T> FirstOrDefault<T>(this RedisAggregationSet<T> source)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
Returns
Type | Description |
---|---|
AggregationResult<T> | A single result. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
FirstOrDefaultAsync<T>(RedisAggregationSet<T>)
Get's the first element from Redis.
Declaration
public static async ValueTask<AggregationResult<T>> FirstOrDefaultAsync<T>(this RedisAggregationSet<T> source)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<AggregationResult<T>> | A single result. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
FirstValue<T, TResult>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>)
Retrieve the first value matching the expression in Redis.
Declaration
public static GroupedAggregationSet<T> FirstValue<T, TResult>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression to apply. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The First Value. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type. |
FirstValue<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>)
Retrieve the first value matching the expression in Redis.
Declaration
public static RedisReply FirstValue<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression to apply. |
Returns
Type | Description |
---|---|
RedisReply | The First Value. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type. |
FirstValue<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, String)
Retrieve the first value matching the expression in Redis.
Declaration
public static RedisReply FirstValue<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, string sortedBy)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression to apply. |
System.String | sortedBy | Direction to sort results by. |
Returns
Type | Description |
---|---|
RedisReply | The First Value. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type. |
FirstValue<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, String, SortDirection)
Retrieve the first value matching the expression in Redis.
Declaration
public static RedisReply FirstValue<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, string sortedBy, SortDirection direction)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression to apply. |
System.String | sortedBy | parameter to sort by. |
SortDirection | direction | direction to sor. |
Returns
Type | Description |
---|---|
RedisReply | The First Value. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type. |
FirstValueAsync<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>)
Retrieve the first value matching the expression in Redis.
Declaration
public static async ValueTask<RedisReply> FirstValueAsync<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression to apply. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<RedisReply> | The First Value. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type. |
FirstValueAsync<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, String)
Get the first value from redis matching the expression.
Declaration
public static async ValueTask<RedisReply> FirstValueAsync<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, string sortedBy)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression To match. |
System.String | sortedBy | The field to sort the records in Redis by. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<RedisReply> | A redis reply containing the result. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type of the expression. |
FirstValueAsync<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, String, SortDirection)
Get the first value from redis matching the expression.
Declaration
public static async ValueTask<RedisReply> FirstValueAsync<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, string sortedBy, SortDirection direction)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the RedisAggregationSet. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression To match. |
System.String | sortedBy | The field to sort the records in Redis by. |
SortDirection | direction | The direction to sort the records. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<RedisReply> | A redis reply containing the result. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type of the expression. |
GeoFilter<T>(IRedisCollection<T>, Expression<Func<T, Nullable<GeoLoc>>>, Double, Double, Double, GeoLocDistanceUnit)
Applies a geofilter.
Declaration
public static IRedisCollection<T> GeoFilter<T>(this IRedisCollection<T> source, Expression<Func<T, GeoLoc?>> expression, double lon, double lat, double radius, GeoLocDistanceUnit unit)
Parameters
Type | Name | Description |
---|---|---|
IRedisCollection<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<T, System.Nullable<GeoLoc>>> | expression | The field expression to apply the geofilter to. |
System.Double | lon | longitude. |
System.Double | lat | latitude. |
System.Double | radius | radius. |
GeoLocDistanceUnit | unit | distance unit. |
Returns
Type | Description |
---|---|
IRedisCollection<T> | A RedisCollection with the geofilter applied. |
Type Parameters
Name | Description |
---|---|
T | IndexedType. |
GroupBy<T, TGroupType>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TGroupType>>)
Group like records together by provided fields.
Declaration
public static GroupedAggregationSet<T> GroupBy<T, TGroupType>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TGroupType>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TGroupType>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | A GroupedAggregationSet. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TGroupType | The group type. |
GroupBy<T, TGroupType>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TGroupType>>)
Group like records together by provided fields.
Declaration
public static GroupedAggregationSet<T> GroupBy<T, TGroupType>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TGroupType>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TGroupType>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | A GroupedAggregationSet. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TGroupType | The group type. |
Max<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Reduce the Max of the provided field.
Declaration
public static GroupedAggregationSet<T> Max<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | GroupedAggregationSet with the reducer in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The field type to reduce. |
MaxAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, RedisReply>>)
Max average reduction.
Declaration
public static async ValueTask<RedisReply> MaxAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, RedisReply>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, RedisReply>> | expression | The field expression to max. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<RedisReply> | The max. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Min<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Reduce the Min of the provided field.
Declaration
public static GroupedAggregationSet<T> Min<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | GroupedAggregationSet with the reducer in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The field type to reduce. |
MinAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, RedisReply>>)
Min average reduction.
Declaration
public static async ValueTask<RedisReply> MinAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, RedisReply>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, RedisReply>> | expression | The field expression to min. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<RedisReply> | The min. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
OrderBy<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Order the results by the provided field.
Declaration
public static GroupedAggregationSet<T> OrderBy<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The expression to order by. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | A set with the expression applied. |
Type Parameters
Name | Description |
---|---|
T | The Indexed type. |
TField | The field type. |
OrderBy<T, TField>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Order the results by the provided field.
Declaration
public static RedisAggregationSet<T> OrderBy<T, TField>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The expression to order by. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | A set with the expression applied. |
Type Parameters
Name | Description |
---|---|
T | The Indexed type. |
TField | The field type. |
OrderByDescending<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Order the results by the provided field.
Declaration
public static GroupedAggregationSet<T> OrderByDescending<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The expression to order by. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | A set with the expression applied. |
Type Parameters
Name | Description |
---|---|
T | The Indexed type. |
TField | The field type. |
OrderByDescending<T, TField>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Order the results by the provided field.
Declaration
public static RedisAggregationSet<T> OrderByDescending<T, TField>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The expression to order by. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | A set with the expression applied. |
Type Parameters
Name | Description |
---|---|
T | The Indexed type. |
TField | The field type. |
Quantile<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>, Double)
Retrieve the record at the given quantile. e.g. quantile .5 is median.
Declaration
public static GroupedAggregationSet<T> Quantile<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression, double quantile)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression to get the quantile for. |
System.Double | quantile | The quantile. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The item at the given quantile. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The field type. |
Quantile<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, Double)
Retrieve the record at the given quantile. e.g. quantile .5 is median.
Declaration
public static double Quantile<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, double quantile)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The field expression to get the quantile for. |
System.Double | quantile | The quantile. |
Returns
Type | Description |
---|---|
System.Double | The item at the given quantile. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The field type. |
QuantileAsync<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, Double)
Retrieve the record at the given quantile. e.g. quantile .5 is median.
Declaration
public static async ValueTask<double> QuantileAsync<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, double quantile)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The field expression to get the quantile for. |
System.Double | quantile | The quantile. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Double> | The item at the given quantile. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The field type. |
RandomSample<T, TResult>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, Int64)
Get a Random sample from redis.
Declaration
public static GroupedAggregationSet<T> RandomSample<T, TResult>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, long sampleSize)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The field expression. |
System.Int64 | sampleSize | The sample size. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | A grouped aggregation set with the expression in it's pipeline.. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result to get the sample for. |
RandomSample<T, TResult>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TResult>>, Int64)
Gets a random sample from Redis.
Declaration
public static RedisAggregationSet<T> RandomSample<T, TResult>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TResult>> expression, long sampleSize)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The Source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TResult>> | expression | The expression containing the field to get the random sample for. |
System.Int64 | sampleSize | Random sample size. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | Aggregation set with the random sample in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TResult | The result type. |
Select<T, TR>(IRedisCollection<T>, Expression<Func<T, TR>>)
Specifies which items to pull out of Redis.
Declaration
public static IRedisCollection<TR> Select<T, TR>(this IRedisCollection<T> source, Expression<Func<T, TR>> expression)
Parameters
Type | Name | Description |
---|---|---|
IRedisCollection<T> | source | The Redis Collection. |
System.Linq.Expressions.Expression<System.Func<T, TR>> | expression | The expression for creating the item. |
Returns
Type | Description |
---|---|
IRedisCollection<TR> | A redis collection with the expression applied. |
Type Parameters
Name | Description |
---|---|
T | The indexed type built on. |
TR | The type returned. |
Skip<T>(GroupedAggregationSet<T>, Int32)
Skip a certain number of elements in Redis before reading results back.
Declaration
public static GroupedAggregationSet<T> Skip<T>(this GroupedAggregationSet<T> source, int count)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | the source. |
System.Int32 | count | The number to skip. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The results. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Skip<T>(RedisAggregationSet<T>, Int32)
Skip a certain number of elements in Redis before reading results back.
Declaration
public static GroupedAggregationSet<T> Skip<T>(this RedisAggregationSet<T> source, int count)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Int32 | count | The number to skip. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The results. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Skip<T>(IRedisCollection<T>, Int32)
Skips into the collection by the specified amount.
Declaration
public static IRedisCollection<T> Skip<T>(this IRedisCollection<T> source, int count)
Parameters
Type | Name | Description |
---|---|---|
IRedisCollection<T> | source | The Redis Collection. |
System.Int32 | count | The number of items to skip. |
Returns
Type | Description |
---|---|
IRedisCollection<T> | A RedisCollection with the skip expression applied. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
StandardDeviation<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Reduce the Standard Deviation of the provided field.
Declaration
public static GroupedAggregationSet<T> StandardDeviation<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | GroupedAggregationSet with the reducer in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The field type to reduce. |
StandardDeviation<T, TReduce>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TReduce>>)
Calculates the standard deviation of records of the given field.
Declaration
public static double StandardDeviation<T, TReduce>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TReduce>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The Aggregation Set. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TReduce>> | expression | The expression to apply. |
Returns
Type | Description |
---|---|
System.Double | The standard deviation. |
Type Parameters
Name | Description |
---|---|
T | The indexed Type. |
TReduce | The type to reduce. |
StandardDeviationAsync<T, TReduce>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, TReduce>>)
Calculates the standard deviation of records of the given field.
Declaration
public static async ValueTask<double> StandardDeviationAsync<T, TReduce>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, TReduce>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The Aggregation Set. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TReduce>> | expression | The expression to apply. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Double> | The standard deviation. |
Type Parameters
Name | Description |
---|---|
T | The indexed Type. |
TReduce | The type to reduce. |
Sum<T, TField>(GroupedAggregationSet<T>, Expression<Func<AggregationResult<T>, TField>>)
Reduce the Sum of the provided field.
Declaration
public static GroupedAggregationSet<T> Sum<T, TField>(this GroupedAggregationSet<T> source, Expression<Func<AggregationResult<T>, TField>> expression)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, TField>> | expression | The field expression. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | GroupedAggregationSet with the reducer in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
TField | The field type to reduce. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Decimal>>)
Runs sum reduction.
Declaration
public static async ValueTask<decimal> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, decimal>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Decimal>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Decimal> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Double>>)
Runs sum reduction.
Declaration
public static async ValueTask<double> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, double>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Double>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Double> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Int32>>)
Runs sum reduction.
Declaration
public static async ValueTask<int> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, int>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Int32>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Int32> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Int64>>)
Runs sum reduction.
Declaration
public static async ValueTask<long> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, long>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Int64>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Int64> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Decimal>>>)
Runs sum reduction.
Declaration
public static async ValueTask<decimal?> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, decimal?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Decimal>>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Decimal>> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Double>>>)
Runs sum reduction.
Declaration
public static async ValueTask<double?> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, double?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Double>>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Double>> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Int32>>>)
Runs sum reduction.
Declaration
public static async ValueTask<int?> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, int?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Int32>>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Int32>> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Int64>>>)
Runs sum reduction.
Declaration
public static async ValueTask<long?> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, long?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Int64>>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Int64>> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Nullable<Single>>>)
Runs sum reduction.
Declaration
public static async ValueTask<float?> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, float?>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Nullable<System.Single>>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Nullable<System.Single>> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
SumAsync<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Single>>)
Runs sum reduction.
Declaration
public static async ValueTask<float> SumAsync<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, float>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Single>> | expression | The field expression to sum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask<System.Single> | The sum. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Take<T>(GroupedAggregationSet<T>, Int32)
Take only a certain number of elements from Redis.
Declaration
public static GroupedAggregationSet<T> Take<T>(this GroupedAggregationSet<T> source, int count)
Parameters
Type | Name | Description |
---|---|---|
GroupedAggregationSet<T> | source | the source. |
System.Int32 | count | The number to skip. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The results. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Take<T>(RedisAggregationSet<T>, Int32)
Take only a certain number of elements from Redis.
Declaration
public static GroupedAggregationSet<T> Take<T>(this RedisAggregationSet<T> source, int count)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | the source. |
System.Int32 | count | The number to skip. |
Returns
Type | Description |
---|---|
GroupedAggregationSet<T> | The results. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Take<T>(IRedisCollection<T>, Int32)
Specifies the number of records to retrieve from Redis.
Declaration
public static IRedisCollection<T> Take<T>(this IRedisCollection<T> source, int count)
Parameters
Type | Name | Description |
---|---|---|
IRedisCollection<T> | source | The RedisCollection. |
System.Int32 | count | The number of Items to retrieve. |
Returns
Type | Description |
---|---|
IRedisCollection<T> | A RedisCollection with the expression applied. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Where<T>(RedisAggregationSet<T>, Expression<Func<AggregationResult<T>, Boolean>>)
Initial query expression if applied first, filter expression if applied later for the items to be aggregated by redis.
Declaration
public static RedisAggregationSet<T> Where<T>(this RedisAggregationSet<T> source, Expression<Func<AggregationResult<T>, bool>> expression)
Parameters
Type | Name | Description |
---|---|---|
RedisAggregationSet<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<AggregationResult<T>, System.Boolean>> | expression | The filtration expression. |
Returns
Type | Description |
---|---|
RedisAggregationSet<T> | An Aggregation set with the expression in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |
Where<T>(IRedisCollection<T>, Expression<Func<T, Boolean>>)
Initial query expression for the Redis Collection.
Declaration
public static IRedisCollection<T> Where<T>(this IRedisCollection<T> source, Expression<Func<T, bool>> expression)
Parameters
Type | Name | Description |
---|---|---|
IRedisCollection<T> | source | The source. |
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | expression | The filtration expression. |
Returns
Type | Description |
---|---|
IRedisCollection<T> | A RedisCollection with the expression in the pipeline. |
Type Parameters
Name | Description |
---|---|
T | The indexed type. |