Show / Hide Table of Contents

Class JsonValue

Operator to perform value retrieval from a text field in the database, that contains JSON data.

Inheritance
object
QueryElement
Argument
DatabaseFunctions
JsonValue
Implements
ICloneable
Inherited Members
DatabaseFunctions.GetMainField()
DatabaseFunctions.Field
Argument.Equal(Argument)
Argument.UnEqual(Argument)
Argument.LessThan(Argument)
Argument.LessThanOrEqual(Argument)
Argument.GreaterThan(Argument)
Argument.GreaterThanOrEqual(Argument)
Argument.Like(Argument)
Argument.Like(string)
Argument.NotLike(Argument)
Argument.NotBetween(Argument, Argument)
Argument.Between(Argument, Argument)
Argument.In(params Argument[])
Argument.HasAny(params Argument[])
Argument.HasAll(params Argument[])
Argument.MissingAny(params Argument[])
Argument.MissingAll(params Argument[])
Argument.IsNull()
Argument.IsNotNull()
Argument.NotIn(params Argument[])
Argument.HasFlag(Argument)
Argument.HasNoFlag(Argument)
Argument.ToArgumentArray<T>(T[])
Argument.ToArgumentArray<T>(T[], bool)
Argument.Alias
Argument.DataType
Argument.Size
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public sealed class JsonValue : DatabaseFunctions, ICloneable
Remarks

This function resolves into the JSON_VALUE function in the database, and can be used to address scalar values in a JSON structure within a text column. It always returns a string, even if the JSON value is a number. See https://docs.microsoft.com/en-us/sql/relational-databases/json/json-path-expressions-sql-server?view=sql-server-ver15 for a documentation of the format.

Constructors

JsonValue(FieldInfo, string)

Perform a scalar JSON value lookup

Declaration
public JsonValue(FieldInfo mainField, string jsonPath)
Parameters
Type Name Description
FieldInfo mainField

Text column in database to look into

string jsonPath

Path expression - typical example: $.executeMode to address a root element;
$.array[1].thing to extract the thing element from the second element of the "array" array

Remarks

This function resolves into the JSON_VALUE function in the database, and can be used to address scalar values in a JSON structure within a text column. It always returns a string, even if the JSON value is a number. See https://docs.microsoft.com/en-us/sql/relational-databases/json/json-path-expressions-sql-server?view=sql-server-ver15 for a documentation of the format.

Exceptions
Type Condition
ArgumentException

Properties

JsonPath

Operator to perform value retrieval from a text field in the database, that contains JSON data.

Declaration
public Parameter JsonPath { get; }
Property Value
Type Description
Parameter
Remarks

This function resolves into the JSON_VALUE function in the database, and can be used to address scalar values in a JSON structure within a text column. It always returns a string, even if the JSON value is a number. See https://docs.microsoft.com/en-us/sql/relational-databases/json/json-path-expressions-sql-server?view=sql-server-ver15 for a documentation of the format.

Methods

Clone()

Creates a copy of the query elements, but shares parameter values with the original, so it is not a complete copy.

Declaration
public override object Clone()
Returns
Type Description
object

Copy of all the restrictions/joins

Overrides
QueryElement.Clone()
Remarks

This method is used by the SentryQueryUpdater to modify a query with sentry extensions without affecting the original query.

ToString()

Operator to perform value retrieval from a text field in the database, that contains JSON data.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
Remarks

This function resolves into the JSON_VALUE function in the database, and can be used to address scalar values in a JSON structure within a text column. It always returns a string, even if the JSON value is a number. See https://docs.microsoft.com/en-us/sql/relational-databases/json/json-path-expressions-sql-server?view=sql-server-ver15 for a documentation of the format.

Implements

ICloneable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top