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

Function object to retrieve a specific reference from a connection. More...

#include <reference.hpp>

Public Member Functions

maybe< reference_toperator() (connection_ptr const &conn, std::string const &url) const

Detailed Description

Function object to retrieve a specific reference from a connection.

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

Member Function Documentation

◆ operator()()

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