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
jsonColumnColumnExpressionA column containg JSON value.
propertyIPropertyA property representing the result of this expression.
pathIReadOnlyList<PathSegment>A list of path segments leading to the scalar from the root of the JSON stored in the column.
nullableboolA 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
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Print(ExpressionPrinter)
protected override void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinterExpressionPrinter
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
jsonColumnColumnExpressionThe 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
visitorExpressionVisitor