libpqxx  v4.0-1
C++ library for PostgreSQL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pqxx::internal Namespace Reference

Private namespace for libpqxx's internal use; do not access. More...

Namespaces

namespace  gate
 
namespace  pq
 Forward declarations of libpq types as needed in libpqxx headers.
 

Classes

class  callgate
 Base class for call gates. More...
 
struct  deref_ptr
 
struct  dereference
 Functor: dereference iterator. More...
 
class  Escaper
 
class  namedclass
 
class  notify_listener_forwarder
 Internal helper class to support old-style, payloadless notifications. More...
 
class  parameterized_invocation
 
class  PQAlloc
 Reference-counted smart pointer to libpq-allocated object. More...
 
class  reactivation_avoidance_counter
 
class  reactivation_avoidance_exemption
 Scoped exemption to reactivation avoidance. More...
 
class  refcount
 Helper class used in reference counting (doubly-linked circular list) Reference-counted smart-pointer for libpq-allocated resources. More...
 
struct  result_data
 Information shared between all copies of a result set. More...
 
class  scoped_array
 
class  sql_cursor
 Cursor with SQL positioning semantics. More...
 
class  statement_parameters
 
class  transactionfocus
 
class  unique
 Ensure proper opening/closing of GUEST objects related to a "host" object. More...
 

Typedefs

typedef const char * cstring
 Work around problem with library export directives and pointers. More...
 
typedef long result_difference_type
 
typedef unsigned long result_size_type
 

Functions

void CheckUniqueRegistration (const namedclass *New, const namedclass *Old)
 
void CheckUniqueUnregistration (const namedclass *New, const namedclass *Old)
 
int digit_to_number (char c) throw ()
 Compute numeric value of given textual digit (assuming that it is a digit) More...
 
template<typename T >
PGSTD::ptrdiff_t distance (T first, T last)
 Wrapper for std::distance; not all platforms have std::distance(). More...
 
PGSTD::string PQXX_LIBEXPORT Escape (const PGSTD::string &s, const PGSTD::string &null)
 
PGSTD::string EscapeAny (const PGSTD::string &s, const PGSTD::string &null)
 
PGSTD::string EscapeAny (const char s[], const PGSTD::string &null)
 
template<typename T >
PGSTD::string EscapeAny (const T &t, const PGSTD::string &null)
 
void PQXX_LIBEXPORT freemallocmem (const void *) throw ()
 
template<typename P >
void freemallocmem_templated (P *p) throw ()
 
void PQXX_LIBEXPORT freemem_result_data (const result_data *) throw ()
 
void PQXX_LIBEXPORT freepqmem (const void *) throw ()
 
template<typename P >
void freepqmem_templated (P *p) throw ()
 
char number_to_digit (int i) throw ()
 
result::size_type PQXX_LIBEXPORT obtain_stateless_cursor_size (sql_cursor &)
 
void PQXX_LIBEXPORT sleep_seconds (int)
 Sleep for the given number of seconds. More...
 
result PQXX_LIBEXPORT stateless_cursor_retrieve (sql_cursor &, result::difference_type size, result::difference_type begin_pos, result::difference_type end_pos)
 
cstring PQXX_LIBEXPORT strerror_wrapper (int err, char buf[], PGSTD::size_t len) throw ()
 Human-readable description for error code, possibly using given buffer. More...
 
void PQXX_LIBEXPORT PQXX_NORETURN throw_null_conversion (const PGSTD::string &type)
 Throw exception for attempt to convert null to given type. More...
 
void wait_read (const internal::pq::PGconn *)
 
void wait_read (const internal::pq::PGconn *, long seconds, long microseconds)
 
void wait_write (const internal::pq::PGconn *)
 

Variables

const char sql_begin_work []
 Commonly used SQL commands. More...
 
const char sql_commit_work []
 
const char sql_rollback_work []
 

Detailed Description

Private namespace for libpqxx's internal use; do not access.

This namespace hides definitions internal to libpqxx. These are not supposed to be used by client programs, and they may change at any time without notice.

Conversely, if you find something in this namespace tremendously useful, by all means do lodge a request for its publication.

Warning
Here be dragons!

Typedef Documentation

typedef const char* pqxx::internal::cstring

Work around problem with library export directives and pointers.

typedef unsigned long pqxx::internal::result_size_type

Function Documentation

void pqxx::internal::CheckUniqueRegistration ( const namedclass *  New,
const namedclass *  Old 
)

Referenced by pqxx::internal::unique< internal::transactionfocus >::Register().

Here is the caller graph for this function:

void pqxx::internal::CheckUniqueUnregistration ( const namedclass *  New,
const namedclass *  Old 
)

Referenced by pqxx::internal::unique< internal::transactionfocus >::Unregister().

Here is the caller graph for this function:

int pqxx::internal::digit_to_number ( char  c) throw ()
inline

Compute numeric value of given textual digit (assuming that it is a digit)

template<typename T >
PGSTD::ptrdiff_t pqxx::internal::distance ( first,
last 
)
inline

Wrapper for std::distance; not all platforms have std::distance().

PGSTD::string PQXX_LIBEXPORT pqxx::internal::Escape ( const PGSTD::string &  s,
const PGSTD::string &  null 
)

Referenced by EscapeAny().

Here is the caller graph for this function:

PGSTD::string pqxx::internal::EscapeAny ( const PGSTD::string &  s,
const PGSTD::string &  null 
)
inline

References Escape().

Referenced by pqxx::internal::Escaper< IT >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

PGSTD::string pqxx::internal::EscapeAny ( const char  s[],
const PGSTD::string &  null 
)
inline

References Escape().

Here is the call graph for this function:

template<typename T >
PGSTD::string pqxx::internal::EscapeAny ( const T &  t,
const PGSTD::string &  null 
)
inline

References Escape(), and pqxx::to_string().

Here is the call graph for this function:

void PQXX_LIBEXPORT pqxx::internal::freemallocmem ( const void *  ) throw ()

Referenced by freemallocmem_templated().

Here is the caller graph for this function:

template<typename P >
void pqxx::internal::freemallocmem_templated ( P *  p) throw ()
inline

References freemallocmem().

Here is the call graph for this function:

void PQXX_LIBEXPORT pqxx::internal::freemem_result_data ( const result_data *  ) throw ()
void PQXX_LIBEXPORT pqxx::internal::freepqmem ( const void *  ) throw ()

Referenced by freepqmem_templated().

Here is the caller graph for this function:

template<typename P >
void pqxx::internal::freepqmem_templated ( P *  p) throw ()
inline

References freepqmem().

Here is the call graph for this function:

char pqxx::internal::number_to_digit ( int  i) throw ()
inline
result::size_type PQXX_LIBEXPORT pqxx::internal::obtain_stateless_cursor_size ( sql_cursor &  )

Referenced by pqxx::stateless_cursor< up, op >::size().

Here is the caller graph for this function:

void PQXX_LIBEXPORT pqxx::internal::sleep_seconds ( int  )

Sleep for the given number of seconds.

May return early, e.g. when interrupted by a signal. Completes instantly if a zero or negative sleep time is requested.

result PQXX_LIBEXPORT pqxx::internal::stateless_cursor_retrieve ( sql_cursor &  ,
result::difference_type  size,
result::difference_type  begin_pos,
result::difference_type  end_pos 
)

Referenced by pqxx::stateless_cursor< up, op >::retrieve().

Here is the caller graph for this function:

cstring PQXX_LIBEXPORT pqxx::internal::strerror_wrapper ( int  err,
char  buf[],
PGSTD::size_t  len 
) throw ()

Human-readable description for error code, possibly using given buffer.

Wrapper for strerror() or thread-safe variant, as available. The default code copies the string to the provided buffer, but this may not always be necessary. The result is guaranteed to remain usable for as long as the given buffer does.

Parameters
errsystem error code as copied from errno
bufcaller-provided buffer for message to be stored in, if needed
lenusable size (in bytes) of provided buffer
Returns
human-readable error string, which may or may not reside in buf
void PQXX_LIBEXPORT PQXX_NORETURN pqxx::internal::throw_null_conversion ( const PGSTD::string &  type)

Throw exception for attempt to convert null to given type.

Referenced by pqxx::string_traits< PGSTD::string >::null(), pqxx::string_traits< const PGSTD::string >::null(), and pqxx::string_traits< PGSTD::stringstream >::null().

Here is the caller graph for this function:

void pqxx::internal::wait_read ( const internal::pq::PGconn *  )
void pqxx::internal::wait_read ( const internal::pq::PGconn *  ,
long  seconds,
long  microseconds 
)
void pqxx::internal::wait_write ( const internal::pq::PGconn *  )

Variable Documentation

const char pqxx::internal::sql_begin_work[]

Commonly used SQL commands.

const char pqxx::internal::sql_commit_work[]
const char pqxx::internal::sql_rollback_work[]