Class SelectDef
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
DisplayLabels
Gets or sets the translation mapping table used for custom localized display titles.
public Dictionary<string, string> DisplayLabels { get; set; }
Property Value
FilterDefs
Gets or sets the complete filter specification models collection belonging to this data query execution path.
public SqlFilterDefs FilterDefs { get; set; }
Property Value
Owner
Gets or sets the optional metadata context owner or master view model reference binding layer.
[JsonIgnore]
public object Owner { get; set; }
Property Value
SqlText
Gets or sets the raw SQL query statement text template configuration block.
public string SqlText { get; set; }
Property Value
UseFilters
Gets or sets a value indicating whether runtime filter processing operations are active.
public bool UseFilters { get; set; }
Property Value
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
NamestringFieldNamestringFilterDataTypeDataFieldTypeBoolOpBoolOpConditionOpConditionOpTitleKeystring
Returns
AddFilter(FieldDef)
Adds a filter definition inferred directly from a field definition object metadata layout.
public SqlFilterDef AddFilter(FieldDef FieldDef)
Parameters
FieldDefFieldDef
Returns
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
Returns
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
ModuleNamestringThe module name.
StoreSqlStoreThe SQL store.
FilterDefsSqlFilterDefsThe filter definitions to validate.