Skip to content

Commit 20da4a5

Browse files
authored
Merge pull request #13 from dangtrungtin/master
Reflect source code from Nodejs client version 0.8.4
2 parents ab88e6d + c4d3331 commit 20da4a5

29 files changed

Lines changed: 1506 additions & 836 deletions

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ SOURCES = src/TimeSeriesProperties.cpp \
2626
src/RowKeyPredicate.cpp \
2727
src/RowSet.cpp \
2828
src/TimestampUtils.cpp \
29+
src/Field.cpp \
30+
src/Util.cpp
2931

3032
all: $(PROGRAM)
3133

src/AggregationResult.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
namespace griddb {
2020

21+
/**
22+
* @brief Constructor a new Aggregation Result:: Aggregation Result object
23+
* @param aggResult Stores the result of an aggregation operation
24+
*/
2125
AggregationResult::AggregationResult(GSAggregationResult* aggResult) :
2226
mAggResult(aggResult), timestamp_output_with_float(false) {
2327
}
@@ -27,7 +31,7 @@ namespace griddb {
2731
}
2832

2933
/**
30-
* Release AggregationResult resource
34+
* @brief Release AggregationResult resource
3135
*/
3236
void AggregationResult::close() {
3337
if (mAggResult != NULL) {
@@ -37,9 +41,12 @@ namespace griddb {
3741
}
3842

3943
/**
40-
* Obtains the result of aggregating numeric-type values.
44+
* @brief Obtains the result of aggregating numeric-type values.
45+
* @param type Column type
46+
* @param *agValue aggregation result
4147
*/
4248
void AggregationResult::get(GSType type, griddb::Field *agValue) {
49+
assert(agValue != NULL);
4350
void *value;
4451
agValue->type = type;
4552
switch (type) {
@@ -62,4 +69,5 @@ namespace griddb {
6269
"Value cannot be retrieved from Aggregation result");
6370
}
6471
}
72+
6573
} /* namespace griddb */

src/AggregationResult.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef _AGGREGATIONRESULT_H_
1818
#define _AGGREGATIONRESULT_H_
1919

20+
#include <assert.h>
21+
2022
#include "GSException.h"
2123
#include "Field.h"
2224
#include "gridstore.h"
@@ -35,7 +37,6 @@ class AggregationResult {
3537
bool timestamp_output_with_float;
3638
~AggregationResult();
3739
void close();
38-
3940
void get(GSType type, griddb::Field *agValue);
4041
AggregationResult(GSAggregationResult* aggResult);
4142

0 commit comments

Comments
 (0)