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

Function object to retrieve a container metadata record and its timestamp from the metadata database. More...

#include <metadata.hpp>

Public Types

using result_t = std::tuple<record_t, timestamp_t>

Public Member Functions

auto operator() (context_t const &ctx, oid_t const &oid) const -> maybe< result_t >

Detailed Description

Function object to retrieve a container metadata record and its timestamp from the metadata database.

This function object provides an operator() that takes a context and an OID, and returns a maybe<result_t> containing a tuple of the container metadata record and its timestamp if available. It is designed to be used in a constexpr context for compile-time evaluation of record retrieval operations.

Member Function Documentation

◆ operator()()

auto oxy::api::metadata::get_fn::operator() ( context_t const & ctx,
oid_t const & oid ) const -> maybe< result_t >
Parameters
ctx- The context for container metadata record operations.
oid- The OID of the record to retrieve.
Returns
A maybe<result_t> containing a tuple of the container metadata record and its timestamp if available, or nothing() if not found.