Class SqlFunctionExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents a function call in a SQL tree.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class SqlFunctionExpression : SqlExpression, IPrintableExpression- Inheritance
- 
      
      
      
      SqlFunctionExpression
- Implements
- 
      IPrintableExpression
- Inherited Members
Constructors
SqlFunctionExpression(SqlExpression, string, bool, bool, Type, RelationalTypeMapping)
Creates a new instance of the SqlFunctionExpression class which represents a niladic function which is invoked on an instance.
public SqlFunctionExpression(SqlExpression instance, string functionName, bool nullable, bool instancePropagatesNullability, Type type, RelationalTypeMapping typeMapping)Parameters
- instanceSqlExpression
- An expression on which the function is defined. 
- functionNamestring
- The name of the function. 
- nullablebool
- A bool value indicating whether this function can return null. 
- instancePropagatesNullabilitybool
- A value indicating if instance propagates null to result. 
- typeType
- The Type of the expression. 
- typeMappingRelationalTypeMapping
- The RelationalTypeMapping associated with the expression. 
SqlFunctionExpression(SqlExpression, string, IEnumerable<SqlExpression>, bool, bool, IEnumerable<bool>, Type, RelationalTypeMapping)
Creates a new instance of the SqlFunctionExpression class which represents a function which is invoked on an instance.
public SqlFunctionExpression(SqlExpression instance, string functionName, IEnumerable<SqlExpression> arguments, bool nullable, bool instancePropagatesNullability, IEnumerable<bool> argumentsPropagateNullability, Type type, RelationalTypeMapping typeMapping)Parameters
- instanceSqlExpression
- An expression on which the function is applied. 
- functionNamestring
- The name of the function. 
- argumentsIEnumerable<SqlExpression>
- The arguments of the function. 
- nullablebool
- A bool value indicating whether this function can return null. 
- instancePropagatesNullabilitybool
- A value indicating if instance propagates null to result. 
- argumentsPropagateNullabilityIEnumerable<bool>
- A list of bool values indicating whether individual arguments propagate null to result. 
- typeType
- The Type of the expression. 
- typeMappingRelationalTypeMapping
- The RelationalTypeMapping associated with the expression. 
SqlFunctionExpression(string, bool, Type, RelationalTypeMapping)
Creates a new instance of the SqlFunctionExpression class which represents a built-in niladic function.
public SqlFunctionExpression(string functionName, bool nullable, Type type, RelationalTypeMapping typeMapping)Parameters
- functionNamestring
- The name of the function. 
- nullablebool
- A bool value indicating whether this function can return null. 
- typeType
- The Type of the expression. 
- typeMappingRelationalTypeMapping
- The RelationalTypeMapping associated with the expression. 
SqlFunctionExpression(string, IEnumerable<SqlExpression>, bool, IEnumerable<bool>, Type, RelationalTypeMapping)
Creates a new instance of the SqlFunctionExpression class which represents a built-in function.
public SqlFunctionExpression(string functionName, IEnumerable<SqlExpression> arguments, bool nullable, IEnumerable<bool> argumentsPropagateNullability, Type type, RelationalTypeMapping typeMapping)Parameters
- functionNamestring
- The name of the function. 
- argumentsIEnumerable<SqlExpression>
- The arguments of the function. 
- nullablebool
- A bool value indicating whether this function can return null. 
- argumentsPropagateNullabilityIEnumerable<bool>
- A list of bool values indicating whether individual arguments propagate null to result. 
- typeType
- The Type of the expression. 
- typeMappingRelationalTypeMapping
- The RelationalTypeMapping associated with the expression. 
SqlFunctionExpression(string, string, bool, Type, RelationalTypeMapping)
Creates a new instance of the SqlFunctionExpression class which represents a niladic function.
public SqlFunctionExpression(string schema, string functionName, bool nullable, Type type, RelationalTypeMapping typeMapping)Parameters
- schemastring
- The schema in which the function is defined. 
- functionNamestring
- The name of the function. 
- nullablebool
- A bool value indicating whether this function can return null. 
- typeType
- The Type of the expression. 
- typeMappingRelationalTypeMapping
- The RelationalTypeMapping associated with the expression. 
SqlFunctionExpression(string, string, IEnumerable<SqlExpression>, bool, IEnumerable<bool>, Type, RelationalTypeMapping)
Creates a new instance of the SqlFunctionExpression class which represents a function.
public SqlFunctionExpression(string schema, string functionName, IEnumerable<SqlExpression> arguments, bool nullable, IEnumerable<bool> argumentsPropagateNullability, Type type, RelationalTypeMapping typeMapping)Parameters
- schemastring
- The schema in which the function is defined. 
- functionNamestring
- The name of the function. 
- argumentsIEnumerable<SqlExpression>
- The arguments of the function. 
- nullablebool
- A bool value indicating whether this function can return null. 
- argumentsPropagateNullabilityIEnumerable<bool>
- A list of bool values indicating whether individual arguments propagate null to result. 
- typeType
- The Type of the expression. 
- typeMappingRelationalTypeMapping
- The RelationalTypeMapping associated with the expression. 
Properties
Arguments
The list of arguments of this function.
public virtual IReadOnlyList<SqlExpression> Arguments { get; }Property Value
ArgumentsPropagateNullability
A list of bool values indicating whether individual argument propagate null to the result.
public virtual IReadOnlyList<bool> ArgumentsPropagateNullability { get; }Property Value
Instance
The instance on which this function is applied.
public virtual SqlExpression Instance { get; }Property Value
InstancePropagatesNullability
A bool value indicating if the instance propagates null to the result.
public virtual bool? InstancePropagatesNullability { get; }Property Value
- bool?
IsBuiltIn
A bool value indicating if the function is built-in.
public virtual bool IsBuiltIn { get; }Property Value
IsNiladic
A bool value indicating if the function is niladic.
public virtual bool IsNiladic { get; }Property Value
IsNullable
A bool value indicating if the function can return null result.
public virtual bool IsNullable { get; }Property Value
Name
The name of the function.
public virtual string Name { get; }Property Value
Schema
The schema in which the function is defined, if any.
public virtual string Schema { get; }Property Value
Methods
ApplyTypeMapping(RelationalTypeMapping)
Applies supplied type mapping to this expression.
public virtual SqlFunctionExpression ApplyTypeMapping(RelationalTypeMapping typeMapping)Parameters
- typeMappingRelationalTypeMapping
- A relational type mapping to apply. 
Returns
- SqlFunctionExpression
- A new expression which has supplied type mapping. 
Equals(object)
public override bool Equals(object obj)Parameters
- objobject
Returns
GetHashCode()
public override int GetHashCode()Returns
Print(ExpressionPrinter)
protected override void Print(ExpressionPrinter expressionPrinter)Parameters
- expressionPrinterExpressionPrinter
Update(SqlExpression, IReadOnlyList<SqlExpression>)
Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
public virtual SqlFunctionExpression Update(SqlExpression instance, IReadOnlyList<SqlExpression> arguments)Parameters
- instanceSqlExpression
- The Instance property of the result. 
- argumentsIReadOnlyList<SqlExpression>
- The Arguments property of the result. 
Returns
- SqlFunctionExpression
- This expression if no children changed, or an expression with the updated children. 
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)Parameters
- visitorExpressionVisitor