Table of Contents

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 ColumnExpression

A column containg JSON value.

property IProperty

A 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 bool

A value indicating whether the expression is nullable.

Properties

IsNullable

The value indicating whether the expression is nullable.

public virtual bool IsNullable { get; }

Property Value

bool

JsonColumn

The column containg JSON value.

public virtual ColumnExpression JsonColumn { get; }

Property Value

ColumnExpression

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

IReadOnlyList<PathSegment>

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

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 ColumnExpression

The 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

Returns

Expression