libpqxx  7.7.0
pqxx::transaction_focus Class Reference

Base class for things that monopolise a transaction's attention. More...

#include <transaction_focus.hxx>

Inheritance diagram for pqxx::transaction_focus:

Public Member Functions

 transaction_focus (transaction_base &t, std::string_view cname, std::string_view oname)
 
 transaction_focus (transaction_base &t, std::string_view cname, std::string &&oname)
 
 transaction_focus (transaction_base &t, std::string_view cname)
 
 transaction_focus ()=delete
 
 transaction_focus (transaction_focus const &)=delete
 
transaction_focusoperator= (transaction_focus const &)=delete
 
std::string_view classname () const noexcept
 Class name, for human consumption. More...
 
std::string_view name () const &noexcept
 Name for this object, if the caller passed one; empty string otherwise. More...
 
std::string description () const
 
 transaction_focus (transaction_focus &&)=delete
 Can't move a transaction_focus. More...
 
transaction_focusoperator= (transaction_focus &&)=delete
 Can't move a transaction_focus. More...
 

Protected Member Functions

void register_me ()
 
void unregister_me () noexcept
 
void reg_pending_error (std::string const &) noexcept
 
bool registered () const noexcept
 

Protected Attributes

transaction_basem_trans
 

Detailed Description

Base class for things that monopolise a transaction's attention.

You probably won't need to use this class. But it can be useful to know that a given libpqxx class is derived from it.

Pipelines, SQL statements, and data streams are examples of classes derived from transaction_focus. For any given transaction, only one object of such a class can be active at any given time.

Constructor & Destructor Documentation

◆ transaction_focus() [1/6]

pqxx::transaction_focus::transaction_focus ( transaction_base t,
std::string_view  cname,
std::string_view  oname 
)

◆ transaction_focus() [2/6]

pqxx::transaction_focus::transaction_focus ( transaction_base t,
std::string_view  cname,
std::string &&  oname 
)

◆ transaction_focus() [3/6]

pqxx::transaction_focus::transaction_focus ( transaction_base t,
std::string_view  cname 
)

◆ transaction_focus() [4/6]

pqxx::transaction_focus::transaction_focus ( )
delete

◆ transaction_focus() [5/6]

pqxx::transaction_focus::transaction_focus ( transaction_focus const &  )
delete

◆ transaction_focus() [6/6]

pqxx::transaction_focus::transaction_focus ( transaction_focus &&  )
delete

Can't move a transaction_focus.

Moving the transaction_focus would break the transaction's reference back to the object.

Member Function Documentation

◆ classname()

std::string_view pqxx::transaction_focus::classname ( ) const
noexcept

Class name, for human consumption.

Referenced by pqxx::transaction_base::close().

◆ description()

std::string pqxx::transaction_focus::description ( ) const

◆ name()

std::string_view pqxx::transaction_focus::name ( ) const &
noexcept

Name for this object, if the caller passed one; empty string otherwise.

Referenced by pqxx::transaction_base::close().

◆ operator=() [1/2]

transaction_focus& pqxx::transaction_focus::operator= ( transaction_focus const &  )
delete

◆ operator=() [2/2]

transaction_focus& pqxx::transaction_focus::operator= ( transaction_focus &&  )
delete

Can't move a transaction_focus.

Moving the transaction_focus would break the transaction's reference back to the object.

◆ reg_pending_error()

void pqxx::transaction_focus::reg_pending_error ( std::string const &  err)
protectednoexcept

◆ register_me()

void pqxx::transaction_focus::register_me ( )
protected

◆ registered()

bool pqxx::transaction_focus::registered ( ) const
protectednoexcept

◆ unregister_me()

void pqxx::transaction_focus::unregister_me ( )
protectednoexcept

Member Data Documentation

◆ m_trans

transaction_base& pqxx::transaction_focus::m_trans
protected

The documentation for this class was generated from the following files: