pqxx::internal Namespace Reference
[String conversion]

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


Classes

class  reactivation_avoidance_counter
class  scoped_noticer
 Temporarily set different noticer for connection, then restore old one. More...
class  disable_noticer
 Temporarily disable the notice processor. More...
class  reactivation_avoidance_exemption
 Scoped exemption to reactivation avoidance. More...
class  Escaper
class  transactionfocus
struct  dereference
 Functor: dereference iterator. More...
struct  deref_ptr
class  refcount
 Helper class used in reference counting (doubly-linked circular list). More...
class  PQAlloc
 Reference-counted smart pointer to libpq-allocated object. More...
class  scoped_array
class  namedclass
class  unique
 Ensure proper opening/closing of GUEST objects related to a "host" object. More...

Namespaces

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

Typedefs

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

Functions

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 *)
PGSTD::string PQXX_LIBEXPORT Escape (const PGSTD::string &s, const PGSTD::string &null)
template<typename STR>
PGSTD::string EscapeAny (const PGSTD::string &s, const PGSTD::string &null)
template<typename STR>
PGSTD::string EscapeAny (const char s[], const PGSTD::string &null)
template<typename T>
PGSTD::string EscapeAny (const T &t, const PGSTD::string &null)
int digit_to_number (char c) throw ()
 Compute numeric value of given textual digit (assuming that it is a digit).
char number_to_digit (int i) throw ()
template<typename T>
const char * FmtString (T t) PQXX_DEPRECATED
 C-style format strings for various built-in types.
template<>
const char * FmtString (short)
template<>
const char * FmtString (unsigned short)
template<>
const char * FmtString (int)
template<>
const char * FmtString (long)
template<>
const char * FmtString (float)
template<>
const char * FmtString (double)
template<>
const char * FmtString (char)
PGSTD::string escape_string (const char str[], size_t maxlen)
 Internal string-escaping function; does not deal with encodings well.
void PQXX_LIBEXPORT FromString_string (const char Str[], PGSTD::string &Obj) PQXX_DEPRECATED
 For libpqxx internal use only: convert C string to C++ string.
void PQXX_LIBEXPORT FromString_ucharptr (const char Str[], const unsigned char *&Obj) PQXX_DEPRECATED
 For libpqxx internal use only: convert unsigned char * to C++ string.
PGSTD::string PQXX_LIBEXPORT Quote_string (const PGSTD::string &Obj, bool EmptyIsNull)
 For libpqxx internal use only: quote std::string.
PGSTD::string PQXX_LIBEXPORT Quote_charptr (const char Obj[], bool EmptyIsNull)
 For libpqxx internal use only: quote const char *.
void PQXX_LIBEXPORT freepqmem (void *)
void PQXX_LIBEXPORT freemem_result (pq::PGresult *) throw ()
void PQXX_LIBEXPORT freemem_notif (pq::PGnotify *) throw ()
void CheckUniqueRegistration (const namedclass *New, const namedclass *Old)
void CheckUniqueUnregistration (const namedclass *New, const namedclass *Old)
void PQXX_LIBEXPORT sleep_seconds (int)
 Sleep for the given number of seconds.
cstring PQXX_LIBEXPORT strerror_wrapper (int err, char buf[], PGSTD::size_t len) throw ()
 Human-readable description for error code, possibly using given buffer.
void wait_read (const pq::PGconn *c)
void wait_read (const pq::PGconn *c, long seconds, long microseconds)
void wait_write (const pq::PGconn *c)
string Escape (const string &s, const string &null)
void FromString_string (const char Str[], string &Obj)
void FromString_ucharptr (const char Str[], const unsigned char *&Obj)
 For libpqxx internal use only: convert unsigned char * to C++ string.
string escape_string (const char str[], size_t maxlen)
 Internal string-escaping function; does not deal with encodings well.
string Quote_string (const string &Obj, bool EmptyIsNull)
string Quote_charptr (const char Obj[], bool EmptyIsNull)
 For libpqxx internal use only: quote const char *.
void freemem_result (pqxx::internal::pq::PGresult *p) throw ()
void freemem_notif (pqxx::internal::pq::PGnotify *p) throw ()
void CheckUniqueRegistration (const namedclass *New, const namedclass *Old)
void CheckUniqueUnregistration (const namedclass *New, const namedclass *Old)
void freepqmem (void *p)
void sleep_seconds (int s)
 Sleep for the given number of seconds.
const char * strerror_wrapper (int err, char buf[], size_t len) throw ()

Variables

const char sql_begin_work [] = "BEGIN"
 Commonly used SQL commands.
const char sql_commit_work [] = "COMMIT"
const char sql_rollback_work [] = "ROLLBACK"


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 unsigned long pqxx::internal::result_size_type

typedef long pqxx::internal::result_difference_type

typedef const char* pqxx::internal::cstring

Work around problem with library export directives and pointers.


Function Documentation

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  ) 

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

template<typename STR>
PGSTD::string pqxx::internal::EscapeAny ( const PGSTD::string &  s,
const PGSTD::string &  null 
)

template<typename STR>
PGSTD::string pqxx::internal::EscapeAny ( const char  s[],
const PGSTD::string &  null 
)

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

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

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

char pqxx::internal::number_to_digit ( int  i  )  throw ()

template<typename T>
const char* pqxx::internal::FmtString ( t  ) 

C-style format strings for various built-in types.

Deprecated:
To be removed when ToString and FromString are taken out
Only allowed for certain types, for which this function is explicitly specialized. When attempting to use the template for an unsupported type, the generic version will be instantiated. This will result in a link error for the symbol error_unsupported_type_in_string_conversion(), with a template argument describing the unsupported input type.

template<>
const char* pqxx::internal::FmtString ( short   ) 

template<>
const char * pqxx::internal::FmtString ( unsigned  short  ) 

template<>
const char* pqxx::internal::FmtString ( int   ) 

template<>
const char* pqxx::internal::FmtString ( long   ) 

template<>
const char* pqxx::internal::FmtString ( float   ) 

template<>
const char* pqxx::internal::FmtString ( double   ) 

template<>
const char* pqxx::internal::FmtString ( char   ) 

PGSTD::string pqxx::internal::escape_string ( const char  str[],
size_t  maxlen 
)

Internal string-escaping function; does not deal with encodings well.

Deprecated:
Use transaction's esc() function instead

void PQXX_LIBEXPORT pqxx::internal::FromString_string ( const char  Str[],
PGSTD::string &  Obj 
)

For libpqxx internal use only: convert C string to C++ string.

Deprecated:
To be removed when FromString is taken out

void PQXX_LIBEXPORT pqxx::internal::FromString_ucharptr ( const char  Str[],
const unsigned char *&  Obj 
)

For libpqxx internal use only: convert unsigned char * to C++ string.

Deprecated:
To be removed when FromString is taken out

PGSTD::string PQXX_LIBEXPORT pqxx::internal::Quote_string ( const PGSTD::string &  Obj,
bool  EmptyIsNull 
)

For libpqxx internal use only: quote std::string.

PGSTD::string PQXX_LIBEXPORT pqxx::internal::Quote_charptr ( const char  Obj[],
bool  EmptyIsNull 
)

For libpqxx internal use only: quote const char *.

void PQXX_LIBEXPORT pqxx::internal::freepqmem ( void *   ) 

void PQXX_LIBEXPORT pqxx::internal::freemem_result ( pq::PGresult  )  throw ()

void PQXX_LIBEXPORT pqxx::internal::freemem_notif ( pq::PGnotify  )  throw ()

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

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

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.

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 strerror_r(), as available. The normal case is to copy the string to the provided buffer, but this may not always be the case. The result is guaranteed to remain usable for as long as the given buffer does.

Parameters:
err system error code as copied from errno
buf caller-provided buffer for message to be stored in, if needed
len usable size (in bytes) of provided buffer
Returns:
human-readable error string, which may or may not reside in buf

void pqxx::internal::wait_read ( const pq::PGconn c  ) 

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

void pqxx::internal::wait_write ( const pq::PGconn c  ) 

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

void pqxx::internal::FromString_string ( const char  Str[],
string &  Obj 
)

void pqxx::internal::FromString_ucharptr ( const char  Str[],
const unsigned char *&  Obj 
)

For libpqxx internal use only: convert unsigned char * to C++ string.

Deprecated:
To be removed when FromString is taken out

string pqxx::internal::escape_string ( const char  str[],
size_t  maxlen 
)

Internal string-escaping function; does not deal with encodings well.

Deprecated:
Use transaction's esc() function instead

string pqxx::internal::Quote_string ( const string &  Obj,
bool  EmptyIsNull 
)

string pqxx::internal::Quote_charptr ( const char  Obj[],
bool  EmptyIsNull 
)

For libpqxx internal use only: quote const char *.

void pqxx::internal::freemem_result ( pqxx::internal::pq::PGresult p  )  throw ()

void pqxx::internal::freemem_notif ( pqxx::internal::pq::PGnotify p  )  throw ()

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

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

void pqxx::internal::freepqmem ( void *  p  ) 

void 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.

const char* pqxx::internal::strerror_wrapper ( int  err,
char  buf[],
size_t  len 
) throw ()


Variable Documentation

const char pqxx::internal::sql_begin_work = "BEGIN"

Commonly used SQL commands.

const char pqxx::internal::sql_commit_work = "COMMIT"

const char pqxx::internal::sql_rollback_work = "ROLLBACK"


Generated on Wed Sep 6 16:56:00 2006 for libpqxx by  doxygen 1.4.7