Class JsonScalarExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression representing a scalar extracted from a JSON column with the given path in SQL tree.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class JsonScalarExpression : SqlExpression, IPrintableExpression
- Inheritance
-
JsonScalarExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
JsonScalarExpression(ColumnExpression, IProperty, IReadOnlyList<PathSegment>, bool)
Creates a new instance of the JsonScalarExpression class.
public JsonScalarExpression(ColumnExpression jsonColumn, IProperty property, IReadOnlyList<PathSegment> path, bool nullable)
Parameters
jsonColumn
ColumnExpressionA column containg JSON value.
property
IPropertyA property representing the result of this expression.
path
IReadOnlyList<PathSegment>A list of path segments leading to the scalar from the root of the JSON stored in the column.
nullable
boolA value indicating whether the expression is nullable.
Properties
IsNullable
The value indicating whether the expression is nullable.
public virtual bool IsNullable { get; }
Property Value
JsonColumn
The column containg JSON value.
public virtual ColumnExpression JsonColumn { get; }
Property Value
Path
The list of path segments leading to the scalar from the root of the JSON stored in the column.
public virtual IReadOnlyList<PathSegment> Path { get; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Print(ExpressionPrinter)
protected override void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinter
ExpressionPrinter
Update(ColumnExpression)
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 JsonScalarExpression Update(ColumnExpression jsonColumn)
Parameters
jsonColumn
ColumnExpressionThe JsonColumn property of the result.
Returns
- JsonScalarExpression
This expression if no children changed, or an expression with the updated children.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitor