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

Function object to get a commit. More...

#include <commit.hpp>

Public Member Functions

maybe< commit_toperator() (const connection_ptr &conn, const object_t &obj) const
maybe< commit_toperator() (const connection_ptr &conn, const oid_t &oid) const
maybe< commit_toperator() (const connection_ptr &conn, const reference_t &ref) const

Detailed Description

Function object to get a commit.

This functor provides an interface to retrieve a commit from a container using its OID, an object, or a reference.

Member Function Documentation

◆ operator()() [1/3]

maybe< commit_t > oxy::core::get_commit_fn::operator() ( const connection_ptr & conn,
const object_t & obj ) const
Parameters
conn- A pointer to the database (container) connection from which to retrieve the commit.
obj- The object representing the commit to retrieve.
Returns
A maybe<commit_t> containing the commit if found, or an empty maybe if not found.

◆ operator()() [2/3]

maybe< commit_t > oxy::core::get_commit_fn::operator() ( const connection_ptr & conn,
const oid_t & oid ) const
Parameters
conn- A pointer to the database (container) connection from which to retrieve the commit.
oid- The OID of the commit to retrieve.
Returns
A maybe<commit_t> containing the commit if found, or an empty maybe if not found.

◆ operator()() [3/3]

maybe< commit_t > oxy::core::get_commit_fn::operator() ( const connection_ptr & conn,
const reference_t & ref ) const
Parameters
conn- A pointer to the database (container) connection from which to retrieve the commit.
ref- The reference representing the commit to retrieve.
Returns
A maybe<commit_t> containing the commit if found, or an empty maybe if not found.