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

Function object to push an index item to a connection. More...

#include <index.hpp>

Public Types

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

Public Member Functions

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

Detailed Description

Function object to push an index item to a connection.

This functor provides two operator() overloads: one that takes a connection pointer and returns a coroutine push type for pushing index items, and another that takes a connection pointer and an index item, pushes the item to the connection, and returns the corresponding object. It allows for coroutine-based pushing of index items to the connection.

Member Function Documentation

◆ operator()() [1/2]

auto oxy::core::push_index_fn::operator() ( connection_ptr & conn) const -> coro_t::push_type
Parameters
conn- A pointer to the database (container) connection to which the index will be pushed.
Returns
A coroutine push type that allows for pushing index items to the connection.

◆ operator()() [2/2]

object_t oxy::core::push_index_fn::operator() ( connection_ptr const & conn,
index_t const & item ) const
Parameters
conn- A pointer to the database (container) connection to which the index will be pushed.
item- The index item to be pushed.
Returns
The object representing the pushed index item.