OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::core::get_ref_when_fn Struct Reference

Function object to retrieve the timestamp of a reference from a connection. More...

#include <reference.hpp>

Public Member Functions

auto operator() (connection_ptr const &conn, std::string const &name) const -> maybe< timestamp_t >

Detailed Description

Function object to retrieve the timestamp of a reference from a connection.

This functor provides an operator() that takes a connection pointer and a reference name (URL) and returns a maybe<timestamp_t>, indicating that the timestamp may or may not be found. It allows for efficient retrieval of the timestamp associated with a specific reference in the version control system.

Member Function Documentation

◆ operator()()

auto oxy::core::get_ref_when_fn::operator() ( connection_ptr const & conn,
std::string const & name ) const -> maybe< timestamp_t >
Parameters
conn- A pointer to the database (container) connection from which to retrieve the timestamp of the reference.
name- The name (URL) of the reference for which to retrieve the timestamp.
Returns
A maybe<timestamp_t> containing the timestamp if found, or an empty maybe if not found.