Difference between revisions of "CustomDataCacheSpecificationBuildResult class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=<nowiki>CustomDataCacheSpecificationBuildResult</nowiki> |Description=<nowiki>Represents a DataCache specification build result.</nowiki> |Const...")
 
Line 17: Line 17:
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 +
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
<span style="color:#DF8621"> This class is used on workflow of DCS using script </span>
 +
<source lang="javascript">
 +
array param = Workflow_getParameters();
 +
array a = param[0];
 +
array fromDateTime = param[1];
 +
array NonUniqueIds = param[2];
 +
array UniqueIds = param[3];
 +
array extraParameter = param[4];
 +
 +
Dictionary d1 =
 +
{
 +
"NonUniqueIds": NonUniqueIds,
 +
"UniqueId": UniqueIds
 +
};
 +
 +
Dictionary d2 =
 +
{
 +
"NonUniqueIds": {5,6,7,8,9,10,12},
 +
"UniqueId": {0,1,2,3,4,11,13}
 +
};
 +
CustomDataCacheSpecificationBuildResult res = new CustomDataCacheSpecificationBuildResult();
 +
 +
Dictionary d = fromDateTime == empty ? d2 : d1;
 +
 +
res.NonUniqueIds.AddRange(d["NonUniqueIds"]);
 +
res.Ids.AddRange(d["UniqueId"]);
 +
 +
return res;
 +
 +
</source>
 +
 +
See more how DCS using script here

Revision as of 09:57, 26 October 2018

CustomDataCacheSpecificationBuildResult



Represents a DataCache specification build result.

Constructors

  • () - Create a new result set for a dcs

Methods

  • Empty AddVariableForFullCustomColumns(string variableName "Name of constant that is available in custom scripts in this DCS. Takes precedence over column names", object value "Value to store") - Set additional output values. These can be accessed as predefined variables in all full column custom columns
  • string ToString() - The string representation of the object.

Properties

  • array Ids { get; } - Set the ids of the result set (Must be unique integer). These can be accessed by using the variable SYS_SCRIPT_UNIQUEID_SYS. The length of this array must match the length of NonUniqueIds. If doing partial rebuilds, then any ids returned that match a previous builds id result in that row being updated
  • array NonUniqueIds { get; } - Set the non-unique ids of the result set (integer only). These can be accessed by using the variable SYS_SCRIPT_NONUNIQUEID_SYS
  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

This class is used on workflow of DCS using script

array param = Workflow_getParameters();
array a = param[0];
array fromDateTime = param[1];
array NonUniqueIds = param[2];
array UniqueIds = param[3];
array extraParameter = param[4];

Dictionary d1 =
{
 "NonUniqueIds": NonUniqueIds,
 "UniqueId": UniqueIds
};

Dictionary d2 =
{
	"NonUniqueIds": {5,6,7,8,9,10,12},
		"UniqueId": {0,1,2,3,4,11,13}
};
CustomDataCacheSpecificationBuildResult res = new CustomDataCacheSpecificationBuildResult();

Dictionary d = fromDateTime == empty ? d2 : d1;

res.NonUniqueIds.AddRange(d["NonUniqueIds"]);
res.Ids.AddRange(d["UniqueId"]);

return res;

See more how DCS using script here