Class S.FieldExpression
Namespace: SuperOffice.Data
Assembly: SoDataBase.dll
Syntax
public static class FieldExpression : Object
Methods
Count(Argument)
Counts the rows defined by expression or table; counting is done for the argument expression with an implied DISTINCT. Use CountAll if you need the total number of rows.
Declaration
public static Count Count(Argument arg)
Parameters
Type | Name | Description |
---|---|---|
Argument | arg | The Count argument. |
Returns
Type | Description |
---|---|
Count | a new instance of the Count class based on the argument provided. |
CountAll(Argument)
Counts the rows defined by expression or table; this variant counts the total result set.
Declaration
public static CountAll CountAll(Argument arg)
Parameters
Type | Name | Description |
---|---|---|
Argument | arg | The Count argument. |
Returns
Type | Description |
---|---|
CountAll | a new instance of the Count class based on the argument provided. |
Distinct(FieldInfo)
Distinct keyword; gives distinct rows by comparing ALL fields
Declaration
public static Distinct Distinct(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | This field becomes an ordinary return field, it has no effect on the distinct comparison |
Returns
Type | Description |
---|---|
Distinct | a new instance of the Distinct class based on the argument provided. |
FieldTypeConvert(FieldInfo, FieldDataType)
FieldTypeConvert will convert the in-parameter field to the incoming fieldDatatype.
Declaration
public static FieldTypeConvert FieldTypeConvert(FieldInfo field, FieldDataType newType)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | The field you want to convert. |
FieldDataType | newType | The new type of the field. |
Returns
Type | Description |
---|---|
FieldTypeConvert | a new instance of the FieldTypeConvert class based on the arguments provided. |
FieldTypeConvert(FieldInfo, FieldDataType, Int32)
FieldTypeConvert will convert the in-parameter field to the incoming fieldDatatype with length like the in-parameter length.
Declaration
public static FieldTypeConvert FieldTypeConvert(FieldInfo field, FieldDataType newType, int newLength)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | The field you want to convert. |
FieldDataType | newType | The new type of the field. |
Int32 | newLength | The length of the conversion. |
Returns
Type | Description |
---|---|
FieldTypeConvert | a new instance of the FieldTypeConvert class based on the arguments provided. |
JsonValue(FieldInfo, String)
Perform a scalar JSON value lookup
Declaration
public static JsonValue JsonValue(FieldInfo field, string jsonAccessor)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Text column in database to look into |
String | jsonAccessor | Path expression - typical example: $.executeMode to address a root element;
|
Returns
Type | Description |
---|---|
JsonValue |
Exceptions
Type | Condition |
---|---|
ArgumentException | Only a subset of characters are allowed in JSON paths to limit SQL Injection vulnerabilities |
Max(Argument)
Finds the maximum value in a column by expression.
Declaration
public static Max Max(Argument arg)
Parameters
Type | Name | Description |
---|---|---|
Argument | arg | The Max argument. |
Returns
Type | Description |
---|---|
Max | a new instance of the Max class based on the argument provided. |
Min(Argument)
Finds the minimum value in a column by expression.
Declaration
public static Min Min(Argument arg)
Parameters
Type | Name | Description |
---|---|---|
Argument | arg | The arg. |
Returns
Type | Description |
---|---|
Min | a new instance of the Min class based on the argument provided. |
NewAlias(String)
Alias on for example Field or aggregation
Declaration
public static Alias NewAlias(string alias)
Parameters
Type | Name | Description |
---|---|---|
String | alias | The alias |
Returns
Type | Description |
---|---|
Alias | a new instance of the Alias class based on the argument provided. |
Sum(Argument)
Finds the sum of a column by expression.
Declaration
public static Sum Sum(Argument arg)
Parameters
Type | Name | Description |
---|---|---|
Argument | arg | The Sum argument. |
Returns
Type | Description |
---|---|
Sum | a new instance of the Sum class based on the argument provided. |