OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::api::metadata::select_fn Struct Reference

Function object to select OIDs from the container metadata database based on an expression. More...

#include <metadata.hpp>

Public Types

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

Public Member Functions

auto operator() (context_t const &ctx) const -> coro_t::pull_type
auto operator() (context_t const &ctx, std::string const &expr) const -> coro_t::pull_type

Detailed Description

Function object to select OIDs from the container metadata database based on an expression.

This function object provides two operator() overloads: one that takes a context and returns a pull coroutine for iterating over all OIDs, and another that takes a context and an expression string for iterating over OIDs that match the specified expression. It is designed to be used in a coroutine-based context for efficient selection of OIDs from the container metadata database.

Member Function Documentation

◆ operator()() [1/2]

auto oxy::api::metadata::select_fn::operator() ( context_t const & ctx) const -> coro_t::pull_type
Parameters
ctx- The context for container metadata record operations.
Returns
A coroutine pull type that yields OIDs from the container metadata database.

◆ operator()() [2/2]

auto oxy::api::metadata::select_fn::operator() ( context_t const & ctx,
std::string const & expr ) const -> coro_t::pull_type
Parameters
ctx- The context for container metadata record operations.
expr- The expression string to filter the selection of OIDs.
Returns
A coroutine pull type that yields OIDs from the container metadata database that match the specified expression.