OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::filter::push_fn Struct Reference

Function object to push a filter. More...

#include <filter.hpp>

Public Types

using coro_t = boost::coroutines2::coroutine<oid_t>
using coro_t = boost::coroutines2::coroutine<oid_t>

Public Member Functions

auto operator() (connection_ptr const &conn, std::string const &filter_name) const -> coro_t::push_type
auto operator() (connection_ptr const &conn, std::string const &filter_name) const -> coro_t::push_type
void operator() (connection_ptr const &conn, std::string const &filter_name, std::vector< oid_t > const &items) const
void operator() (connection_ptr const &conn, std::string const &filter_name, std::vector< oid_t > const &items) const

Detailed Description

Function object to push a filter.

This function object provides a coroutine-based interface to push a filter into the database (container). It takes a connection pointer and a filter name as input and returns a coroutine push type that yields the identifiers (oid_t) of the rows that match the specified filter. This allows for efficient processing of filtered results in a lazy manner, enabling the caller to handle each matching row as it is produced by the coroutine. The push operation is useful for applying filters to data and retrieving only the relevant rows based on the specified criteria.

Member Function Documentation

◆ operator()() [1/4]

auto oxy::filter::push_fn::operator() ( connection_ptr const & conn,
std::string const & filter_name ) const -> coro_t::push_type
Parameters
conn- A pointer to the database (container) connection where the filter will be pushed.
filter_name- The name of the filter to be pushed.
Returns
A coroutine push type that yields the identifiers (oid_t) of the rows that match the specified filter.

◆ operator()() [2/4]

auto oxy::filter::push_fn::operator() ( connection_ptr const & conn,
std::string const & filter_name ) const -> coro_t::push_type
Parameters
conn- A pointer to the database (container) connection where the filter will be pushed.
filter_name- The name of the filter to be pushed.
Returns
A coroutine push type that yields the identifiers (oid_t) of the rows that match the specified filter.

◆ operator()() [3/4]

void oxy::filter::push_fn::operator() ( connection_ptr const & conn,
std::string const & filter_name,
std::vector< oid_t > const & items ) const
Parameters
conn- The connection pointer to the database (container).
filter_name- The name of the filter to push items into.
items- A vector of items to be pushed into the specified filter.

◆ operator()() [4/4]

void oxy::filter::push_fn::operator() ( connection_ptr const & conn,
std::string const & filter_name,
std::vector< oid_t > const & items ) const
Parameters
conn- The connection pointer to the database (container).
filter_name- The name of the filter to push items into.
items- A vector of items to be pushed into the specified filter.