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

Function object to count the number of records in the container metadata database. More...

#include <metadata.hpp>

Public Member Functions

int64_t operator() (context_t const &ctx) const
int64_t operator() (context_t const &ctx, std::string const &expr) const

Detailed Description

Function object to count the number of records in the container metadata database.

This function object provides two operator() overloads: one that takes a context and returns the count of all records, and another that takes a context and an expression string for counting records that match the specified expression. It is designed to be used in a constexpr context for compile-time evaluation of record counting operations.

Member Function Documentation

◆ operator()() [1/2]

int64_t oxy::api::metadata::count_fn::operator() ( context_t const & ctx) const
Parameters
ctx- The context for container metadata record operations.
Returns
The count of all records in the container metadata database.

◆ operator()() [2/2]

int64_t oxy::api::metadata::count_fn::operator() ( context_t const & ctx,
std::string const & expr ) const
Parameters
ctx- The context for container metadata record operations.
expr- The expression string to filter the count of records.
Returns
The count of records in the container metadata database that match the specified expression.