WhereExpFragment class
Revision as of 10:20, 22 September 2020 by Administrator (talk | contribs)
WhereExpFragment
Represents a data cache specification column with user data.
Parent class
Inherits from object
Constructors
- (string expression "Expression for the fragment.") - Create a fragment with the given expression. This is an expensive operation when called many times
- (string selector "Selector expression of the where expression, e.g. "count()".", WhereExpFragment whereExp "Left hand side of the operation.") - Create a fragment as a complete where expression.
- (WhereExpFragment fragment "Fragment to replace values in.", Dictionary replacement "Look for keys and replace with the constants.") - Create a new fragment where the given values has been replaced, e.g. col > DATES + {"DATES":#2020...#} => col > #2020...#.
- (int operation "See WHEREEXPFRAGMENT_xxx, e.g. WHEREEXPFRAGMENT_AND.", WhereExpFragment lhs "Left hand side of the operation.", WhereExpFragment rhs "Right hand side of the operation.") - Create a new fragment as an operation between two other fragments.
Methods
- Empty AddDependency(string key "Key in Dictionary that this expression depends on") - If you access another cell, you need to inform the engine about this, so it can determine which cells to execute in parallel
- (From object) string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Examples
DataCacheSpecification dcs = new DataCacheSpecification (dcsRId);
Dictionary exp = {
"Total": new WhereExpFragment (WHEREEXPFRAGMENT_ADD, new WhereExpFragment ("count() where Gender==1"), new WhereExpFragment ("count() where Gender==2")),
"Male": new WhereExpFragment ("count()", new WhereExpFragment ("Gender==1")),
"Female": new WhereExpFragment ("count() where Gender==2")};
dcs.EvalWhereExps(exp);