Compartilhar via


PathSegment Class

Definition

A struct representing a component of JSON path used in JsonQueryExpression or JsonScalarExpression.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class PathSegment
[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct PathSegment
[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct PathSegment : Microsoft.EntityFrameworkCore.Query.IRelationalQuotableExpression
type PathSegment = class
[<System.Runtime.CompilerServices.IsReadOnly>]
type PathSegment = struct
[<System.Runtime.CompilerServices.IsReadOnly>]
type PathSegment = struct
    interface IRelationalQuotableExpression
Public Class PathSegment
Public Structure PathSegment
Public Structure PathSegment
Implements IRelationalQuotableExpression
Inheritance
PathSegment
Inheritance
PathSegment
Attributes
Implements

Constructors

PathSegment(SqlExpression)

Creates a new PathSegment struct representing JSON array element access.

PathSegment(String)

Creates a new PathSegment struct representing JSON property access.

Properties

ArrayIndex

The index of an element which is being accessed in the JSON array.

Key

The key which is being accessed in the JSON.

PropertyName

The name of JSON property which is being accessed.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

Quote()

Quotes the expression; that is, returns an expression that, when evaluated, would construct an expression identical to this one. Used to generate code for precompiled queries, which reconstructs this expression.

ToString()

Returns a string that represents the current object.

Applies to