Class JsonValue
Operator to perform value retrieval from a text field in the database, that contains JSON data.
Implements
Inherited Members
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;
|
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
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
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.