@@ -11831,7 +11831,7 @@ namespace sqlite_orm {
1183111831 namespace internal {
1183211832
1183311833 template<class T, class C>
11834- std::string serialize(const T& t, const C& context);
11834+ auto serialize(const T& t, const C& context);
1183511835
1183611836 /**
1183711837 * Serialize default value of a column's default valu
@@ -15282,7 +15282,7 @@ namespace sqlite_orm {
1528215282 struct order_by_t;
1528315283
1528415284 template<class T, class C>
15285- std::string serialize(const T& t, const C& context);
15285+ auto serialize(const T& t, const C& context);
1528615286
1528715287 template<class T, class Ctx>
1528815288 std::string serialize_order_by(const T&, const Ctx&);
@@ -17710,7 +17710,7 @@ namespace sqlite_orm {
1771017710 namespace internal {
1771117711
1771217712 template<class T, class C>
17713- std::string serialize(const T& t, const C& context);
17713+ auto serialize(const T& t, const C& context);
1771417714
1771517715 template<class T, class Ctx>
1771617716 std::vector<std::string>& collect_table_column_names(std::vector<std::string>& collectedExpressions,
@@ -17834,7 +17834,7 @@ namespace sqlite_orm {
1783417834 namespace internal {
1783517835 // collecting column names utilizes the statement serializer
1783617836 template<class T, class C>
17837- std::string serialize(const T& t, const C& context);
17837+ auto serialize(const T& t, const C& context);
1783817838
1783917839 inline void unquote_identifier(std::string& identifier) {
1784017840 if(!identifier.empty()) {
@@ -18097,6 +18097,8 @@ namespace sqlite_orm {
1809718097
1809818098// #include "serializing_util.h"
1809918099
18100+ // #include "serialize_result_type.h"
18101+
1810018102// #include "statement_binder.h"
1810118103
1810218104// #include "values.h"
@@ -18119,7 +18121,7 @@ namespace sqlite_orm {
1811918121 struct statement_serializer;
1812018122
1812118123 template<class T, class C>
18122- std::string serialize(const T& t, const C& context) {
18124+ auto serialize(const T& t, const C& context) {
1812318125 statement_serializer<T> serializer;
1812418126 return serializer(t, context);
1812518127 }
@@ -18209,7 +18211,7 @@ namespace sqlite_orm {
1820918211 }
1821018212
1821118213 template<class Ctx>
18212- std::string serialize(const statement_type& statement, const Ctx& context, const std::string& tableName) {
18214+ auto serialize(const statement_type& statement, const Ctx& context, const std::string& tableName) {
1821318215 std::stringstream ss;
1821418216 ss << "CREATE TABLE " << streaming_identifier(tableName) << " ( "
1821518217 << streaming_expressions_tuple(statement.elements, context) << ")";
@@ -18487,7 +18489,7 @@ namespace sqlite_orm {
1848718489 using statement_type = rank_t;
1848818490
1848918491 template<class Ctx>
18490- std::string operator()(const statement_type& /*statement*/, const Ctx&) const {
18492+ serialize_result_type operator()(const statement_type& /*statement*/, const Ctx&) const {
1849118493 return "rank";
1849218494 }
1849318495 };
@@ -19011,7 +19013,7 @@ namespace sqlite_orm {
1901119013 using statement_type = conflict_clause_t;
1901219014
1901319015 template<class Ctx>
19014- std::string operator()(const statement_type& statement, const Ctx&) const {
19016+ serialize_result_type operator()(const statement_type& statement, const Ctx&) const {
1901519017 switch(statement) {
1901619018 case conflict_clause_t::rollback:
1901719019 return "ROLLBACK";
@@ -19043,7 +19045,7 @@ namespace sqlite_orm {
1904319045 using statement_type = null_t;
1904419046
1904519047 template<class Ctx>
19046- std::string operator()(const statement_type& /*statement*/, const Ctx& /*context*/) const {
19048+ serialize_result_type operator()(const statement_type& /*statement*/, const Ctx& /*context*/) const {
1904719049 return "NULL";
1904819050 }
1904919051 };
@@ -19053,7 +19055,7 @@ namespace sqlite_orm {
1905319055 using statement_type = not_null_t;
1905419056
1905519057 template<class Ctx>
19056- std::string operator()(const statement_type& /*statement*/, const Ctx& /*context*/) const {
19058+ serialize_result_type operator()(const statement_type& /*statement*/, const Ctx& /*context*/) const {
1905719059 return "NOT NULL";
1905819060 }
1905919061 };
@@ -19691,7 +19693,7 @@ namespace sqlite_orm {
1969119693 using statement_type = conflict_action;
1969219694
1969319695 template<class Ctx>
19694- std::string operator()(const statement_type& statement, const Ctx&) const {
19696+ serialize_result_type operator()(const statement_type& statement, const Ctx&) const {
1969519697 switch(statement) {
1969619698 case conflict_action::replace:
1969719699 return "REPLACE";
@@ -19714,7 +19716,10 @@ namespace sqlite_orm {
1971419716
1971519717 template<class Ctx>
1971619718 std::string operator()(const statement_type& statement, const Ctx& context) const {
19717- return "OR " + serialize(statement.action, context);
19719+ std::stringstream ss;
19720+
19721+ ss << "OR " << serialize(statement.action, context);
19722+ return ss.str();
1971819723 }
1971919724 };
1972019725
@@ -19949,7 +19954,7 @@ namespace sqlite_orm {
1994919954 using statement_type = trigger_timing;
1995019955
1995119956 template<class Ctx>
19952- std::string operator()(const statement_type& statement, const Ctx&) const {
19957+ serialize_result_type operator()(const statement_type& statement, const Ctx&) const {
1995319958 switch(statement) {
1995419959 case trigger_timing::trigger_before:
1995519960 return "BEFORE";
@@ -19967,7 +19972,7 @@ namespace sqlite_orm {
1996719972 using statement_type = trigger_type;
1996819973
1996919974 template<class Ctx>
19970- std::string operator()(const statement_type& statement, const Ctx&) const {
19975+ serialize_result_type operator()(const statement_type& statement, const Ctx&) const {
1997119976 switch(statement) {
1997219977 case trigger_type::trigger_delete:
1997319978 return "DELETE";
@@ -20218,7 +20223,7 @@ namespace sqlite_orm {
2021820223 using statement_type = default_values_t;
2021920224
2022020225 template<class Ctx>
20221- std::string operator()(const statement_type&, const Ctx&) const {
20226+ serialize_result_type operator()(const statement_type&, const Ctx&) const {
2022220227 return "DEFAULT VALUES";
2022320228 }
2022420229 };
0 commit comments