@@ -22,8 +22,9 @@ namespace griddb {
2222 * @brief Constructor a new Aggregation Result:: Aggregation Result object
2323 * @param aggResult Stores the result of an aggregation operation
2424 */
25- AggregationResult::AggregationResult (GSAggregationResult* aggResult) :
26- mAggResult (aggResult), timestamp_output_with_float(false ) {
25+ AggregationResult::AggregationResult (GSAggregationResult *aggResult) :
26+ mAggResult (aggResult),
27+ timestamp_output_with_float (false ) {
2728 }
2829
2930 AggregationResult::~AggregationResult () {
@@ -50,22 +51,24 @@ namespace griddb {
5051 void *value;
5152 agValue->type = type;
5253 switch (type) {
53- case GS_TYPE_DOUBLE:
54- value = &agValue->value .asDouble ;
55- break ;
56- case GS_TYPE_LONG:
57- value = &agValue->value .asLong ;
58- break ;
59- case GS_TYPE_TIMESTAMP:
60- value = &agValue->value .asTimestamp ;
61- break ;
62- default :
63- throw GSException (mAggResult , " Not support type from Aggregation result" );
64- break ;
54+ case GS_TYPE_DOUBLE:
55+ value = &agValue->value .asDouble ;
56+ break ;
57+ case GS_TYPE_LONG:
58+ value = &agValue->value .asLong ;
59+ break ;
60+ case GS_TYPE_TIMESTAMP:
61+ value = &agValue->value .asTimestamp ;
62+ break ;
63+ default :
64+ throw GSException (mAggResult ,
65+ " Not support type from Aggregation result" );
66+ break ;
6567 }
6668 GSBool ret = gsGetAggregationValue (mAggResult , value, type);
6769 if (ret == GS_FALSE) {
68- throw GSException (mAggResult ,
70+ throw GSException (
71+ mAggResult ,
6972 " Value cannot be retrieved from Aggregation result" );
7073 }
7174 }
0 commit comments