Table of Contents

Class Sql.ExtensionAttribute

Namespace
LinqToDB
Assembly
linq2db.dll
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple = true)]
public class Sql.ExtensionAttribute : Sql.ExpressionAttribute, _Attribute
Inheritance
Sql.ExtensionAttribute
Implements
Inherited Members
Extension Methods

Constructors

ExtensionAttribute(string)

public ExtensionAttribute(string expression)

Parameters

expression string

ExtensionAttribute(string, string)

public ExtensionAttribute(string configuration, string expression)

Parameters

configuration string
expression string

ExtensionAttribute(string, Type)

public ExtensionAttribute(string configuration, Type builderType)

Parameters

configuration string
builderType Type

ExtensionAttribute(Type)

public ExtensionAttribute(Type builderType)

Parameters

builderType Type

Properties

BuilderType

public Type? BuilderType { get; set; }

Property Value

Type

BuilderValue

public object? BuilderValue { get; set; }

Property Value

object

ChainPrecedence

Defines in which order process extensions. Items will be ordered Descending.

public int ChainPrecedence { get; set; }

Property Value

int

TokenName

public string? TokenName { get; set; }

Property Value

string

Methods

BuildFunctionsChain<TContext>(TContext, IDataContext, SelectQuery, Expression, Func<TContext, Expression, ColumnDescriptor?, ISqlExpression>)

protected List<Sql.SqlExtensionParam> BuildFunctionsChain<TContext>(TContext context, IDataContext dataContext, SelectQuery query, Expression expr, Func<TContext, Expression, ColumnDescriptor?, ISqlExpression> converter)

Parameters

context TContext
dataContext IDataContext
query SelectQuery
expr Expression
converter Func<TContext, Expression, ColumnDescriptor, ISqlExpression>

Returns

List<Sql.SqlExtensionParam>

Type Parameters

TContext

BuildSqlExpression(SqlExtension, Type?, int, SqlFlags, bool?, IsNullableType)

public static SqlExpression BuildSqlExpression(Sql.SqlExtension root, Type? systemType, int precedence, SqlFlags flags, bool? canBeNull, Sql.IsNullableType isNullable)

Parameters

root Sql.SqlExtension
systemType Type
precedence int
flags SqlFlags
canBeNull bool?
isNullable Sql.IsNullableType

Returns

SqlExpression

ExcludeExtensionChain(MappingSchema, Expression)

public static Expression ExcludeExtensionChain(MappingSchema mapping, Expression expr)

Parameters

mapping MappingSchema
expr Expression

Returns

Expression

GetExpression<TContext>(TContext, IDataContext, SelectQuery, Expression, Func<TContext, Expression, ColumnDescriptor?, ISqlExpression>)

public override ISqlExpression GetExpression<TContext>(TContext context, IDataContext dataContext, SelectQuery query, Expression expression, Func<TContext, Expression, ColumnDescriptor?, ISqlExpression> converter)

Parameters

context TContext
dataContext IDataContext
query SelectQuery
expression Expression
converter Func<TContext, Expression, ColumnDescriptor, ISqlExpression>

Returns

ISqlExpression

Type Parameters

TContext

GetExtensionAttributes(Expression, MappingSchema)

public static Sql.ExtensionAttribute[] GetExtensionAttributes(Expression expression, MappingSchema mapping)

Parameters

expression Expression
mapping MappingSchema

Returns

ExtensionAttribute[]

GetObjectID()

Returns mapping attribute id, based on all attribute options.

public override string GetObjectID()

Returns

string