Table of Contents

Class AggregateFunctionBuilder

Namespace
LinqToDB.Linq.Translation
Assembly
linq2db.dll

Fluent builder to configure aggregate/"plain" aggregation translation using existing BuildAggregationFunction pipeline.

public sealed class AggregateFunctionBuilder
Inheritance
object
AggregateFunctionBuilder
Extension Methods

Methods

Build(ITranslationContext, MethodCallExpression, bool)

Builds the aggregate translation. isExpression tells the builder whether the surrounding visitor is in Expression mode (lenient, partial-translation OK) or strict-Sql mode. Combined with IsServerSideOnly on the per-aggregate config: when both !IsServerSideOnly and isExpression hold, a translation failure of any argument / item / value expression makes Build return null (so the dispatch chain can cascade to the partial-translation fallback). Otherwise, failures bubble as SqlErrorExpression the same way as before.

public Expression? Build(ITranslationContext ctx, MethodCallExpression functionCall, bool isExpression = false)

Parameters

ctx ITranslationContext
functionCall MethodCallExpression
isExpression bool

Returns

Expression

ConfigureAggregate(Action<AggregateModeBuilder>)

public AggregateFunctionBuilder ConfigureAggregate(Action<AggregateFunctionBuilder.AggregateModeBuilder> configAction)

Parameters

configAction Action<AggregateFunctionBuilder.AggregateModeBuilder>

Returns

AggregateFunctionBuilder

ConfigurePlain(Action<AggregateModeBuilder>)

public AggregateFunctionBuilder ConfigurePlain(Action<AggregateFunctionBuilder.AggregateModeBuilder> configAction)

Parameters

configAction Action<AggregateFunctionBuilder.AggregateModeBuilder>

Returns

AggregateFunctionBuilder