Difference between revisions of "DCS evaluateWhereExpressions"

From Catglobe Wiki
Jump to: navigation, search
(Example)
(Tag: visualeditor)
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
= DCS_evaluateWhereExpressions =
 
= DCS_evaluateWhereExpressions =
  
 
+
This function is an alias to EvalWhere in [[DataCacheSpecification class]].
  
 
== Syntax ==
 
== Syntax ==
Line 12: Line 12:
 
== Arguments ==
 
== Arguments ==
  
Dictionary ''expression''
+
Dictionary ''expressions (See'' [[DCS evaluateWhereExpression]])
  
 
number ''DCSRId''
 
number ''DCSRId''
Line 21: Line 21:
  
 
== Return type ==
 
== Return type ==
Dictionay
+
Dictionary
  
 
== Example ==
 
== Example ==
Line 27: Line 27:
 
<source lang="javascript">
 
<source lang="javascript">
 
number DCSRId = 15596823;
 
number DCSRId = 15596823;
Dictionary expression = {
+
Dictionary expressions = {
 
"totalFemail": "count() where true",
 
"totalFemail": "count() where true",
 
"userIdFemail": "selectColumn (UserId) where true"
 
"userIdFemail": "selectColumn (UserId) where true"
 
};
 
};
 
string filter = "Q1==2";
 
string filter = "Q1==2";
DCS_evaluateWhereExpressions(expression, DCSRId, "", filter);
+
DCS_evaluateWhereExpressions(expressions, DCSRId, "", filter);
 
//{"totalFemail": 92, "userIdFemail": {160206350,160206358,160206372,...}}
 
//{"totalFemail": 92, "userIdFemail": {160206350,160206358,160206372,...}}
 
</source>
 
</source>

Latest revision as of 09:59, 5 December 2018


DCS_evaluateWhereExpressions

This function is an alias to EvalWhere in DataCacheSpecification class.

Syntax

DCS_evaluateWhereExpressions(expression, DCSRId[, weight[, filter]]);

Arguments

Dictionary expressions (See DCS evaluateWhereExpression)

number DCSRId

string weight

string filter

Return type

Dictionary

Example

number DCSRId = 15596823;
Dictionary expressions = {
	"totalFemail": "count() where true",
	"userIdFemail": "selectColumn (UserId) where true"
	};
string filter = "Q1==2";
DCS_evaluateWhereExpressions(expressions, DCSRId, "", filter);
//{"totalFemail": 92, "userIdFemail": {160206350,160206358,160206372,...}}