Skip to content

Commit 1a4dd74

Browse files
committed
not serialize aggregator on dimension
1 parent f14abbc commit 1a4dd74

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/dataframe/old/datatable.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ void SeriesIndex::setAggr(const std::string &aggr)
8585
aggregator = Refl::get_enum<dataframe::aggregator_type>(aggr);
8686
}
8787

88+
std::string SeriesIndex::toJSON() const
89+
{
90+
std::string res;
91+
Conv::JSONObj obj{res};
92+
obj("name", name);
93+
if (aggregator) obj("aggregator", Conv::toString(*aggregator));
94+
return res;
95+
}
96+
8897
DataCube::iterator_t DataCube::begin() const
8998
{
9099
iterator_t res{this,

src/dataframe/old/types.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ class SeriesIndex
6969

7070
[[nodiscard]] bool isDimension() const { return !aggregator; }
7171

72-
[[nodiscard]] consteval static auto members()
73-
{
74-
return std::tuple{&SeriesIndex::name,
75-
&SeriesIndex::aggregator};
76-
}
72+
[[nodiscard]] std::string toJSON() const;
7773
};
7874

7975
using SeriesList = Type::UniqueList<SeriesIndex>;

0 commit comments

Comments
 (0)