Table of Contents

Interface ITranslationContext

Namespace
LinqToDB.Linq.Translation
Assembly
linq2db.dll
public interface ITranslationContext : ISqlExpressionTranslator
Inherited Members
Extension Methods

Properties

CurrentAlias

string? CurrentAlias { get; }

Property Value

string

CurrentColumnDescriptor

ColumnDescriptor? CurrentColumnDescriptor { get; }

Property Value

ColumnDescriptor

CurrentSelectQuery

SelectQuery CurrentSelectQuery { get; }

Property Value

SelectQuery

DataOptions

DataOptions DataOptions { get; }

Property Value

DataOptions

ExpressionFactory

ISqlExpressionFactory ExpressionFactory { get; }

Property Value

ISqlExpressionFactory

MappingSchema

MappingSchema MappingSchema { get; }

Property Value

MappingSchema

Methods

BuildAggregationFunction(int, Expression, AllowedAggregationOperators, Func<IAggregationContext, BuildAggregationFunctionResult>)

Expression? BuildAggregationFunction(int sequenceExpressionIndex, Expression functionExpression, ITranslationContext.AllowedAggregationOperators allowedOperations, Func<IAggregationContext, BuildAggregationFunctionResult> functionFactory)

Parameters

sequenceExpressionIndex int
functionExpression Expression
allowedOperations ITranslationContext.AllowedAggregationOperators
functionFactory Func<IAggregationContext, BuildAggregationFunctionResult>

Returns

Expression

BuildArrayAggregationFunction(int, Expression, AllowedAggregationOperators, Func<IAggregationContext, BuildAggregationFunctionResult>)

Expression? BuildArrayAggregationFunction(int sequenceExpressionIndex, Expression functionExpression, ITranslationContext.AllowedAggregationOperators allowedOperations, Func<IAggregationContext, BuildAggregationFunctionResult> functionFactory)

Parameters

sequenceExpressionIndex int
functionExpression Expression
allowedOperations ITranslationContext.AllowedAggregationOperators
functionFactory Func<IAggregationContext, BuildAggregationFunctionResult>

Returns

Expression

CanBeEvaluated(Expression)

bool CanBeEvaluated(Expression expression)

Parameters

expression Expression

Returns

bool

CanBeEvaluatedOnClient(Expression)

bool CanBeEvaluatedOnClient(Expression expression)

Parameters

expression Expression

Returns

bool

CreateErrorExpression(Expression, string?, Type?)

SqlErrorExpression CreateErrorExpression(Expression basedOn, string? message = null, Type? type = null)

Parameters

basedOn Expression
message string
type Type

Returns

SqlErrorExpression

CreatePlaceholder(SelectQuery, ISqlExpression, Expression)

SqlPlaceholderExpression CreatePlaceholder(SelectQuery selectQuery, ISqlExpression sqlExpression, Expression basedOn)

Parameters

selectQuery SelectQuery
sqlExpression ISqlExpression
basedOn Expression

Returns

SqlPlaceholderExpression

Evaluate(Expression)

object? Evaluate(Expression expression)

Parameters

expression Expression

Returns

object

GetAggregationContext(Expression)

Expression? GetAggregationContext(Expression expression)

Parameters

expression Expression

Returns

Expression

GetAggregationSelectQuery(Expression)

SelectQuery GetAggregationSelectQuery(Expression enumerableContext)

Parameters

enumerableContext Expression

Returns

SelectQuery

MarkAsNonParameter(Expression, object?)

Forces expression cache to compare expressions by value, not by reference.

void MarkAsNonParameter(Expression expression, object? currentValue)

Parameters

expression Expression
currentValue object

Translate(Expression, TranslationFlags)

Expression Translate(Expression expression, TranslationFlags translationFlags = TranslationFlags.Sql)

Parameters

expression Expression
translationFlags TranslationFlags

Returns

Expression

TryEvaluate(ISqlExpression, out object?)

bool TryEvaluate(ISqlExpression expression, out object? result)

Parameters

expression ISqlExpression
result object

Returns

bool

UsingColumnDescriptor(ColumnDescriptor?)

IDisposable UsingColumnDescriptor(ColumnDescriptor? columnDescriptor)

Parameters

columnDescriptor ColumnDescriptor

Returns

IDisposable

UsingCurrentAggregationContext(Expression)

IDisposable UsingCurrentAggregationContext(Expression basedOn)

Parameters

basedOn Expression

Returns

IDisposable