OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::core::push_commit_fn Struct Reference

Function object to push a commit in a container. More...

#include <commit.hpp>

Public Types

using coro_t = boost::coroutines2::coroutine<std::tuple<object_t, commit_t>>

Public Member Functions

auto operator() (const connection_ptr &conn) const -> coro_t::push_type
object_t operator() (const connection_ptr &conn, const commit_t &item) const

Detailed Description

Function object to push a commit in a container.

This functor provides a coroutine-based interface to push a commit into a container. It allows for lazy evaluation of the commit operation, yielding the resulting object and commit information as a tuple.

Member Function Documentation

◆ operator()() [1/2]

auto oxy::core::push_commit_fn::operator() ( const connection_ptr & conn) const -> coro_t::push_type
Parameters
conn- A pointer to the database (container) connection to which the commit will be pushed.
Returns
A coroutine push type that yields the resulting object and commit information as a tuple.

◆ operator()() [2/2]

object_t oxy::core::push_commit_fn::operator() ( const connection_ptr & conn,
const commit_t & item ) const
Parameters
conn- A pointer to the database (container) connection to which the commit will be pushed.
item- The commit information to be pushed.
Returns
The resulting object representing the pushed commit.