Class Sql.FunctionAttribute
- Namespace
- LinqToDB
- Assembly
- linq2db.dll
Defines an SQL server-side Function with parameters passed in.
[Serializable]
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
public class Sql.FunctionAttribute : Sql.ExpressionAttribute, _Attribute
- Inheritance
-
Sql.FunctionAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
FunctionAttribute()
Defines an SQL Function, which shall be the same as the name as the function called.
public FunctionAttribute()
FunctionAttribute(string)
Defines an SQL function with the given name.
public FunctionAttribute(string name)
Parameters
name
stringThe name of the function. no parenthesis () should be used.
FunctionAttribute(string, params int[])
Defines an SQL function with the given name.
public FunctionAttribute(string name, params int[] argIndices)
Parameters
name
stringThe name of the function. no parenthesis () should be used.
argIndices
int[]Used for setting the order of the method arguments being passed into the function.
FunctionAttribute(string, string)
Defines an SQL function with the given name, for the ProviderName given.
public FunctionAttribute(string configuration, string name)
Parameters
configuration
stringThe Database configuration for which this Expression will be used.
name
stringThe name of the function. no parenthesis () should be used.
FunctionAttribute(string, string, params int[])
Defines an SQL function with the given name, for the ProviderName given.
public FunctionAttribute(string configuration, string name, params int[] argIndices)
Parameters
configuration
stringThe Database configuration for which this Expression will be used.
name
stringThe name of the function. no parenthesis () should be used.
argIndices
int[]Used for setting the order of the method arguments being passed into the function.
Properties
Name
The name of the Database Function
public string? Name { get; set; }
Property Value
Methods
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
TContextdataContext
IDataContextquery
SelectQueryexpression
Expressionconverter
Func<TContext, Expression, ColumnDescriptor, ISqlExpression>
Returns
Type Parameters
TContext
GetObjectID()
Returns mapping attribute id, based on all attribute options.
public override string GetObjectID()