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

Function object to create a commit in a container. More...

#include <commit.hpp>

Public Member Functions

oid_t operator() (const connection_ptr &conn, const oid_t &index, const signature_t &author, const std::vector< oid_t > &parents={}) const

Detailed Description

Function object to create a commit in a container.

This functor provides an interface to create a commit in a container. It takes a connection pointer, an index OID, an author signature, and an optional list of parent OIDs. It returns the OID of the newly created commit.

Member Function Documentation

◆ operator()()

oid_t oxy::core::make_commit_fn::operator() ( const connection_ptr & conn,
const oid_t & index,
const signature_t & author,
const std::vector< oid_t > & parents = {} ) const
inline
Parameters
conn- A pointer to the database (container) connection in which the commit will be created.
index- The OID of the index associated with the commit.
author- The signature of the author of the commit.
parents- An optional vector of OIDs representing the parent commits of the new commit.
Returns
The OID of the newly created commit.