@@ -22194,33 +22194,15 @@ namespace sqlite_orm::internal {
2219422194 }
2219522195 };
2219622196
22197- template<>
22198- struct statement_serializer<window_ref_t, void> {
22199- using statement_type = window_ref_t;
22200-
22201- template<class Ctx>
22202- SQLITE_ORM_STATIC_CALLOP std::string operator()(const statement_type& statement,
22203- const Ctx&) SQLITE_ORM_OR_CONST_CALLOP {
22204- return statement.name;
22205- }
22206- };
22207-
2220822197 template<class Tuple, class Ctx>
2220922198 void serialize_over_arguments(std::stringstream& ss, const Tuple& arguments, const Ctx& context) {
22210- using args_tuple = std::decay_t<Tuple>;
22211- if constexpr (std::tuple_size_v<args_tuple> == 0) {
22199+ if constexpr (std::tuple_size_v<Tuple> == 0) {
2221222200 ss << " OVER ()";
22213- } else if constexpr (std::tuple_size_v<args_tuple > == 1 &&
22214- std::is_same_v<std::tuple_element_t<0, args_tuple >, window_ref_t>) {
22201+ } else if constexpr (std::tuple_size_v<Tuple > == 1 &&
22202+ std::is_same_v<std::tuple_element_t<0, Tuple >, window_ref_t>) {
2221522203 ss << " OVER " << std::get<0>(arguments).name;
2221622204 } else {
22217- ss << " OVER (";
22218- std::string separator;
22219- iterate_tuple(arguments, [&ss, &context, &separator](auto& arg) {
22220- ss << separator << serialize(arg, context);
22221- separator = " ";
22222- });
22223- ss << ")";
22205+ ss << " OVER (" << streaming_actions_tuple(arguments, context) << ")";
2222422206 }
2222522207 }
2222622208
@@ -22260,13 +22242,8 @@ namespace sqlite_orm::internal {
2226022242 SQLITE_ORM_STATIC_CALLOP std::string operator()(const statement_type& statement,
2226122243 const Ctx& context) SQLITE_ORM_OR_CONST_CALLOP {
2226222244 std::stringstream ss;
22263- ss << "WINDOW " << statement.name << " AS (";
22264- std::string separator;
22265- iterate_tuple(statement.arguments, [&ss, &context, &separator](auto& arg) {
22266- ss << separator << serialize(arg, context);
22267- separator = " ";
22268- });
22269- ss << ")";
22245+ ss << "WINDOW " << statement.name << " AS (" << streaming_actions_tuple(statement.arguments, context)
22246+ << ")";
2227022247 return ss.str();
2227122248 }
2227222249 };
0 commit comments