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

Function object to count categories in the metadata database based on a where clause. More...

#include <categories.hpp>

Public Member Functions

int64_t operator() (connection_ptr const &conn) const
int64_t operator() (connection_ptr const &conn, std::string const &where_clause) const

Detailed Description

Function object to count categories in the metadata database based on a where clause.

This function object provides an operator() that takes a connection pointer and returns the count of categories. It also provides an overload that takes a connection pointer and a where clause string for filtering the count. It is designed to be used in a constexpr context for compile-time evaluation of count operations.

Member Function Documentation

◆ operator()() [1/2]

int64_t oxy::api::metadata::category::count_fn::operator() ( connection_ptr const & conn) const
Parameters
conn- The connection pointer to the metadata database.
Returns
The count of categories in the metadata database.

◆ operator()() [2/2]

int64_t oxy::api::metadata::category::count_fn::operator() ( connection_ptr const & conn,
std::string const & where_clause ) const
Parameters
conn- The connection pointer to the metadata database.
where_clause- A string representing the where clause for filtering the count.
Returns
The count of categories in the metadata database based on the where clause.