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

A function object that performs an except operation on a database (container) context, yielding the results as a coroutine. More...

#include <filter.hpp>

Public Types

using coro_t = boost::coroutines2::coroutine<result_t>
using coro_t = boost::coroutines2::coroutine<result_t>
using result_t = std::map<std::string, std::string>
using result_t = std::map<std::string, std::string>

Public Member Functions

auto operator() (context_t const &main, std::string const &filterName, std::string const &column) const -> coro_t::pull_type
auto operator() (context_t const &main, std::string const &filterName, std::string const &column) const -> coro_t::pull_type

Detailed Description

A function object that performs an except operation on a database (container) context, yielding the results as a coroutine.

The except_fn struct defines a function call operator that takes a context_t, a filter name, and a column name as parameters. It returns a coroutine that yields a map of column names to their corresponding values for each row that is present in the specified context but not in the filter. This allows for efficient retrieval of rows that meet the criteria defined by the except operation, enabling the caller to process each matching row as it is produced by the coroutine.

Member Function Documentation

◆ operator()() [1/2]

auto oxy::filter::except_fn::operator() ( context_t const & main,
std::string const & filterName,
std::string const & column ) const -> coro_t::pull_type
Parameters
main- The main database (container) context to perform the except operation on.
filterName- The name of the filter to be excluded from the main context.
column- The name of the column to be used for the except operation.
Returns
A coroutine that yields a map of column names to their corresponding values for each row that is present in the specified context but not in the filter.

◆ operator()() [2/2]

auto oxy::filter::except_fn::operator() ( context_t const & main,
std::string const & filterName,
std::string const & column ) const -> coro_t::pull_type
Parameters
main- The main database (container) context to perform the except operation on.
filterName- The name of the filter to be excluded from the main context.
column- The name of the column to be used for the except operation.
Returns
A coroutine that yields a map of column names to their corresponding values for each row that is present in the specified context but not in the filter.