Skip to content

Commit f4d17c1

Browse files
committed
New overload for execSqlCoro
1 parent 46b5c90 commit f4d17c1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

orm_lib/inc/drogon/orm/DbClient.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,17 @@ class DROGON_EXPORT DbClient : public trantor::NonCopyable
214214
(binder << std::forward<Arguments>(args), 0)...};
215215
return internal::SqlAwaiter(std::move(binder));
216216
}
217+
218+
template <typename T>
219+
internal::SqlAwaiter execSqlCoro(const std::string &sql,
220+
std::vector<T> &args) noexcept
221+
{
222+
auto binder = *this << sql;
223+
for (const auto &arg : args) {
224+
binder << arg;
225+
}
226+
return internal::SqlAwaiter(std::move(binder));
227+
}
217228
#endif
218229

219230
/// Streaming-like method for sql execution. For more information, see the

0 commit comments

Comments
 (0)