Difference between revisions of "DCS evaluateWhereExpressions"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{Function_Template|Name=DCS_evaluateWhereExpressions|ReturnType=Dictionary |Parameters= |Name=<nowiki>where expressions</nowiki>|ConstantType=Dictionary, |Name=<nowiki>dcs re...")
 
(Example)
(Tag: visualeditor)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function_Template|Name=DCS_evaluateWhereExpressions|ReturnType=Dictionary
+
[[Category:Data_Cache_Functions]]
|Parameters=
+
{{HelpFiles}}
|Name=<nowiki>where expressions</nowiki>|ConstantType=Dictionary,
+
 
|Name=<nowiki>dcs resource id</nowiki>|IsOptional=1|ConstantType=Number|IsInteger=1|IsPositive=1,
+
= DCS_evaluateWhereExpressions =
|Name=<nowiki>weight</nowiki>|IsOptional=1|ConstantType=String|IsAllowedEmpty=1,
+
 
|Name=<nowiki>filter</nowiki>|IsOptional=1|ConstantType=String|IsAllowedEmpty=1
+
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 ==
 +
 
 +
<source lang="javascript">
 +
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,...}}
 +
</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,...}}