Difference between revisions of "DCS evaluateWhereExpression"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
[[Category:Data_Cache_Functions]]
+
==== DCS_evaluateWhereExpression ====
{{HelpFiles}}
+
 
 +
Evaluate a WHERE expression
 +
 
 +
===Syntax===
 +
 
 +
DCS_evaluateWhereExpression(whereExpression)
 +
 
 +
===Arguments===
 +
 
 +
*whereExpression: is string. ex: "selectColumn(Id) where true;"
 +
 
 +
===Return value===
 +
 
 +
Execute the where expression and return an object depending on where expression:
 +
 
 +
{| width="438" cellpadding="2" border="1" style="border-collapse: collapse; border: 1px solid #010101" class="tableintopic"
 +
|- valign="top" align="left"
 +
| width="216" bgcolor="#C0C0C0" style="border: 1px solid #010101" |
 +
'''WhereExpression'''
 +
 
 +
| width="222" bgcolor="#C0C0C0" style="border: 1px solid #010101" |
 +
'''Return type'''
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
average
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
empty
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
count
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
number
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
max
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
number
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
median
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
number
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
min
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
number
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
percentile
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
number
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
quantile
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
number
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
select
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
empty
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
selectColumn
 +
 
 +
| width="222" style="border: 1px solid #010101" |
 +
array
 +
 
 +
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
stdev
  
====DCS_evaluateWhereExpression====
+
| width="222" style="border: 1px solid #010101" |
 +
number
  
Evaluate a WHERE expression
+
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
sterr
  
'''Syntax'''
+
| width="222" style="border: 1px solid #010101" |
 +
number
  
DCS_evaluateWhereExpression(whereExpression)
+
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
sum
  
'''Arguments'''
+
| width="222" style="border: 1px solid #010101" |
 +
number
  
* whereExpression: is string
+
|- valign="top" align="left"
 +
| width="216" style="border: 1px solid #010101" |
 +
variance
  
'''Return value'''
+
| width="222" style="border: 1px solid #010101" |
 +
number
  
Execute the where expression and return an object depending on where expression:
+
===Example===
  
{| class="tableintopic" style="border-collapse: collapse; border: 1px solid #010101" width="438" border="1" cellpadding="2"
+
number dcsResourceId1 = DCS_getCurrentDcsResourceId();  
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" bgcolor="#C0C0C0" |
 
'''WhereExpression'''
 
| style="border: 1px solid #010101" width="222" bgcolor="#C0C0C0" |
 
'''Return type'''
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
average
 
| style="border: 1px solid #010101" width="222" |
 
empty
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
count
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
max
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
median
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
min
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
percentile
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
quantile
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
select
 
| style="border: 1px solid #010101" width="222" |
 
empty
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
selectColumn
 
| style="border: 1px solid #010101" width="222" |
 
array
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
stdev
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
sterr
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
sum
 
| style="border: 1px solid #010101" width="222" |
 
number
 
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="216" |
 
variance
 
| style="border: 1px solid #010101" width="222" |
 
number
 
  
'''Example'''
+
number dcsResourceId2 = 123456;
  
number dcsResourceId1 = DCS_getCurrentDcsResourceId();
+
string expression1 = "average(Single2) where true;";  
  
number dcsResourceId2 = 123456;
+
string expression2 = "min(Single2) where true;";  
  
string expression1 = "average(Single2) where true;";
+
DCS_use(dcsResourceId2);  
  
string expression2 = "min(Single2) where true;";
+
print(DCS_evaluateWhereExpression(expression1));  
  
DCS_use(dcsResourceId2);
+
print(DCS_evaluateWhereExpression(expression2));  
  
print(DCS_evaluateWhereExpression(expression1));
+
'''Availability'''
  
print(DCS_evaluateWhereExpression(expression2));
+
Version 5.8 __NOTOC__ <!-- imported from file: 7584.htm-->
  
'''Availability'''
+
|}
  
Version 5.8
+
[[Category:Data_Cache_Functions]]
__NOTOC__
 
<!-- imported from file: 7584.htm-->
 

Revision as of 09:19, 15 December 2011

DCS_evaluateWhereExpression

Evaluate a WHERE expression

Syntax

DCS_evaluateWhereExpression(whereExpression)

Arguments

  • whereExpression: is string. ex: "selectColumn(Id) where true;"

Return value

Execute the where expression and return an object depending on where expression:

WhereExpression

Return type

average

empty

count

number

max

number

median

number

min

number

percentile

number

quantile

number

select

empty

selectColumn

array

stdev

number

sterr

number

sum

number

variance

number

Example

number dcsResourceId1 = DCS_getCurrentDcsResourceId();

number dcsResourceId2 = 123456;

string expression1 = "average(Single2) where true;";

string expression2 = "min(Single2) where true;";

DCS_use(dcsResourceId2);

print(DCS_evaluateWhereExpression(expression1));

print(DCS_evaluateWhereExpression(expression2));

Availability

Version 5.8