|
OXY API 1.0
OXY API Library Documentation
|
A function object that pushes rows into a database context as a coroutine, allowing for dynamic insertion of data. More...
#include <context.hpp>
Public Types | |
| using | coro_t = boost::coroutines2::coroutine<param_t> |
| using | param_t = std::vector<std::string> |
Public Member Functions | |
| auto | operator() (context_t const &ctx, size_t placeholders) const -> coro_t::push_type |
A function object that pushes rows into a database context as a coroutine, allowing for dynamic insertion of data.
The push_fn struct defines a function call operator that takes a context_t and the number of placeholders as parameters. It returns a coroutine that allows for pushing rows into the specified context. The coroutine yields a vector of strings representing the values to be inserted into the database, corresponding to the placeholders defined in the query.
| auto oxy::context::push_fn::operator() | ( | context_t const & | ctx, |
| size_t | placeholders ) const -> coro_t::push_type |
| ctx | - The database context into which to push rows. |
| placeholders | - The number of placeholders in the query for which values will be provided. |