Table of Contents

Class SelectDef

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

Describes a SELECT statement along with its possible WHERE filters.

public class SelectDef : BaseDef, IDef, IJsonLoadable, INotifyPropertyChanged
Inheritance
SelectDef
Implements
Inherited Members
Extension Methods

Constructors

SelectDef()

Initializes a new instance of the SelectDef class.

public SelectDef()

Properties

ColumnTypes

Gets or sets the explicit structural data column database field type classification rules.

public Dictionary<string, DataColumnType> ColumnTypes { get; set; }

Property Value

Dictionary<string, DataColumnType>

DisplayLabels

Gets or sets the translation mapping table used for custom localized display titles.

public Dictionary<string, string> DisplayLabels { get; set; }

Property Value

Dictionary<string, string>

FilterDefs

Gets or sets the complete filter specification models collection belonging to this data query execution path.

public SqlFilterDefs FilterDefs { get; set; }

Property Value

SqlFilterDefs

Owner

Gets or sets the optional metadata context owner or master view model reference binding layer.

[JsonIgnore]
public object Owner { get; set; }

Property Value

object

SqlText

Gets or sets the raw SQL query statement text template configuration block.

public string SqlText { get; set; }

Property Value

string

UseFilters

Gets or sets a value indicating whether runtime filter processing operations are active.

public bool UseFilters { get; set; }

Property Value

bool

Methods

AddFilter(string, string, DataFieldType, BoolOp, ConditionOp, string)

Adds a filter definition to the internal collection using explicit criteria options.

public SqlFilterDef AddFilter(string Name, string FieldName = null, DataFieldType FilterDataType = DataFieldType.String, BoolOp BoolOp = BoolOp.And, ConditionOp ConditionOp = ConditionOp.Equal, string TitleKey = null)

Parameters

Name string
FieldName string
FilterDataType DataFieldType
BoolOp BoolOp
ConditionOp ConditionOp
TitleKey string

Returns

SqlFilterDef

AddFilter(FieldDef)

Adds a filter definition inferred directly from a field definition object metadata layout.

public SqlFilterDef AddFilter(FieldDef FieldDef)

Parameters

FieldDef FieldDef

Returns

SqlFilterDef

CheckDescriptor()

Throws an exception if this descriptor is not fully defined.

public override void CheckDescriptor()

DefineFilters(string, SqlStore)

Creates filter entries in the FilterDefs when no filters exist.

WARNING: The module name and a table name are used in constructing a unique StatementName.

The StatementName is used with the GetNativeSchemaFromTableName(string, string) so the ModuleName.TableName must construct a unique name because schema DataTables are stored in the SqlCache under that unique name.

public SqlFilterDefs DefineFilters(string ModuleName, SqlStore Store)

Parameters

ModuleName string
Store SqlStore

Returns

SqlFilterDefs

ValidateBooleanFilterTypes(string, SqlStore, SqlFilterDefs)

Validates that boolean filters are backed by integer-compatible schema columns.

public void ValidateBooleanFilterTypes(string ModuleName, SqlStore Store, SqlFilterDefs FilterDefs)

Parameters

ModuleName string

The module name.

Store SqlStore

The SQL store.

FilterDefs SqlFilterDefs

The filter definitions to validate.