OXY-SYNC-DIRECTORY 1.0
OXY-SYNC-DIRECTORY Library Documentation
Loading...
Searching...
No Matches
oxy::directory::context_t Struct Reference

Represents a context for database operations, encapsulating a connection and schema information. More...

#include <context.hpp>

Public Member Functions

 context_t (connection_ptr const &conn, std::string const &schema)
 Constructs a context_t with a connection pointer and schema name.
auto const & conn () const
 Accessor for the connection pointer.
 operator connection_ptr () const
 Implicit conversion operator to connection_ptr.
 operator database_t const & () const
 Implicit conversion operator to database_t.
auto operator<=> (context_t const &) const =default
 Comparison operator for context_t.
auto const & schema () const
 Accessor for the schema name.

Detailed Description

Represents a context for database operations, encapsulating a connection and schema information.

This struct provides a convenient way to manage database operations by encapsulating a connection pointer and schema name. It allows for easy access to the underlying connection and schema information, facilitating database interactions.

Constructor & Destructor Documentation

◆ context_t()

oxy::directory::context_t::context_t ( connection_ptr const & conn,
std::string const & schema )
inline

Constructs a context_t with a connection pointer and schema name.

Parameters
connThe connection pointer to the database
schemaThe name of the database schema

References conn(), and schema().