Skip to content

Commit 8659ed2

Browse files
an-taoCopilot
andauthored
Update orm_lib/inc/drogon/orm/DbClient.h
Co-authored-by: Copilot <[email protected]>
1 parent 66a4c4f commit 8659ed2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

orm_lib/inc/drogon/orm/DbClient.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,15 @@ class DROGON_EXPORT DbClient : public trantor::NonCopyable
215215
return internal::SqlAwaiter(std::move(binder));
216216
}
217217

218+
/**
219+
* @brief Execute a SQL query asynchronously using coroutine support.
220+
* This overload accepts a vector of arguments to bind to the query.
221+
* @tparam T The type of the elements in the vector.
222+
* @param sql The SQL query string to execute.
223+
* @param args A vector of arguments to bind to the query.
224+
* @return A SqlAwaiter object that can be co_awaited to retrieve the query result.
225+
* @note This method is only available when coroutine support is enabled.
226+
*/
218227
template <typename T>
219228
internal::SqlAwaiter execSqlCoro(const std::string &sql,
220229
const std::vector<T> &args) noexcept

0 commit comments

Comments
 (0)