Class: OutStatistic

OutStatistic

new OutStatistic(options)

base/OutStatistic.js, line 3

统计信息结构

Name Type Description
options Object

构造参数

Name Type Default Description
statisticType StatisticType 可选

统计方法类型,必传

onStatisticField String 可选

要统计的字段,仅支持统计一个字段,必传

outStatisticFieldName String 可选

输出统计结果时,要统计的字段的别名

Example
//创建统计信息结构对象
let OutStatistic = new zondy.OutStatistic({
  //统计最大值
  statisticType: StatisticType.functionMax,
  //要统计的字段
  onStatisticField: 'GDP2011',
  //要统计的字段的别名
  outStatisticFieldName: 'anotherName'
});

Members

onStatisticFieldString

要统计的字段

onStatisticFieldString

统计的字段名称

outStatisticFieldNameString

输出统计结果时,要统计的字段的别名

outStatisticFieldNameString

导出统计结果的字段名称

statisticTypeString

统计方法类型

statisticTypeOutStatisticType

统计的类型。统计类型包括:FUNCTION_MAX、FUNCTION_MIN、FUNCTION_SUM、FUNCTION_AVG、FUNCTION_COUNT、FUNCTION_VARIANCE、FUNCTION_STANDARD_DEVIATION当数据源是DataStore PG数据时统计类型仅支持:FUNCTION_MAX、FUNCTION_MIN、FUNCTION_SUM、FUNCTION_AVG、FUNCTION_COUNT

Methods

OutStatistic.fromJSON(json){OutStatistic}

service/igs/support/OutStatistic.js, line 49

通过json构造OutStatistic对象

Name Type Description
json Object

json对象

Returns:
Type Description
OutStatistic OutStatistic实例

clone(){OutStatistic}

service/igs/support/OutStatistic.js, line 70

克隆OutStatistic对象

Returns:
Type Description
OutStatistic 克隆后的OutStatistic实例

toJSON(){Object}

service/igs/support/OutStatistic.js, line 58

导出json对象

Returns:
Type Description
Object json对象

toString()

base/OutStatistic.js, line 54

将对象转为字符串

Returns:
Sting 转化后的字符串
Example
OutStatistic.toString();
//statisticType和onStatisticField存在
//字符串为:'{"statisticType": "FUNCTION_SUM","onStatisticField": "GDP2011"'
//statisticType、onStatisticField和outStatisticFieldName存在
//字符串为:'{"statisticType": "FUNCTION_SUM","onStatisticField": "GDP2011", "outStatisticFieldName":"test"}'

OutStatistic

new OutStatistic(options)

service/igs/support/OutStatistic.js, line 3

计算基于字段的统计信息结构

Name Type Description
options Object

构造参数

Name Type Description
statisticType OutStatisticType 可选

统计的类型。统计类型包括:FUNCTION_MAX、FUNCTION_MIN、FUNCTION_SUM、FUNCTION_AVG、FUNCTION_COUNT、FUNCTION_VARIANCE、FUNCTION_STANDARD_DEVIATION当数据源是DataStore PG数据时统计类型仅支持:FUNCTION_MAX、FUNCTION_MIN、FUNCTION_SUM、FUNCTION_AVG、FUNCTION_COUNT

onStatisticField String 可选

统计的字段名称

outStatisticFieldName String 可选

导出统计结果的字段名称

Members

onStatisticFieldString

要统计的字段

onStatisticFieldString

统计的字段名称

outStatisticFieldNameString

输出统计结果时,要统计的字段的别名

outStatisticFieldNameString

导出统计结果的字段名称

statisticTypeString

统计方法类型

statisticTypeOutStatisticType

统计的类型。统计类型包括:FUNCTION_MAX、FUNCTION_MIN、FUNCTION_SUM、FUNCTION_AVG、FUNCTION_COUNT、FUNCTION_VARIANCE、FUNCTION_STANDARD_DEVIATION当数据源是DataStore PG数据时统计类型仅支持:FUNCTION_MAX、FUNCTION_MIN、FUNCTION_SUM、FUNCTION_AVG、FUNCTION_COUNT

Methods

OutStatistic.fromJSON(json){OutStatistic}

service/igs/support/OutStatistic.js, line 49

通过json构造OutStatistic对象

Name Type Description
json Object

json对象

Returns:
Type Description
OutStatistic OutStatistic实例

clone(){OutStatistic}

service/igs/support/OutStatistic.js, line 70

克隆OutStatistic对象

Returns:
Type Description
OutStatistic 克隆后的OutStatistic实例

toJSON(){Object}

service/igs/support/OutStatistic.js, line 58

导出json对象

Returns:
Type Description
Object json对象

toString()

base/OutStatistic.js, line 54

将对象转为字符串

Returns:
Sting 转化后的字符串
Example
OutStatistic.toString();
//statisticType和onStatisticField存在
//字符串为:'{"statisticType": "FUNCTION_SUM","onStatisticField": "GDP2011"'
//statisticType、onStatisticField和outStatisticFieldName存在
//字符串为:'{"statisticType": "FUNCTION_SUM","onStatisticField": "GDP2011", "outStatisticFieldName":"test"}'