util.hxx File Reference

#include "pqxx/compiler-public.hxx"
#include <cstdio>
#include <cctype>
#include <sstream>
#include <stdexcept>
#include <string>
#include <typeinfo>
#include <vector>
#include <pqxx/libpq-forward.hxx>

Include dependency graph for util.hxx:

Go to the source code of this file.

Namespaces

namespace  pqxx
namespace  PGSTD
namespace  pqxx::internal

Classes

class  pqxx::items< T, CONT >
 Container of items with easy contents initialization and string rendering. More...
struct  pqxx::internal::dereference< ITER >
 Functor: dereference iterator. More...
struct  pqxx::internal::deref_ptr< T >
class  pqxx::internal::PQAlloc< T >
 Reference-counted smart pointer to libpq-allocated object. More...
class  pqxx::internal::scoped_array< T >
class  pqxx::internal::namedclass
class  pqxx::internal::unique< GUEST >
 Ensure proper opening/closing of GUEST objects related to a "host" object. More...

Typedefs

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.

Functions

template<typename T>
void pqxx::error_unsupported_type_in_string_conversion (T)
 Dummy name, used by libpqxx in deliberate link errors.
template<typename T>
PGSTD::string pqxx::error_ambiguous_string_conversion (T)
 Dummy name, used to generate meaningful link errors.
template<typename T>
void pqxx::from_string (const char Str[], T &Obj)
 Attempt to convert postgres-generated string to given built-in type.
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], long &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], unsigned long &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], int &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], unsigned int &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], short &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], unsigned short &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], float &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], double &)
template<>
void PQXX_LIBEXPORT pqxx::from_string (const char Str[], bool &)
template<>
void pqxx::from_string (const char Str[], PGSTD::string &Obj)
template<>
void pqxx::from_string (const char Str[], PGSTD::stringstream &Obj)
template<typename T>
void pqxx::from_string (const PGSTD::string &Str, T &Obj)
template<typename T>
void pqxx::from_string (const PGSTD::stringstream &Str, T &Obj)
template<>
void pqxx::from_string (const PGSTD::string &Str, PGSTD::string &Obj)
template<>
void pqxx::from_string (const char[], char &Obj)
template<>
void pqxx::from_string (const char[], signed char &Obj)
template<>
void pqxx::from_string (const char[], unsigned char &Obj)
template<>
void pqxx::from_string (const PGSTD::string &, char &Obj)
template<>
void pqxx::from_string (const PGSTD::string &, signed char &Obj)
template<>
void pqxx::from_string (const PGSTD::string &, unsigned char &Obj)
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>
PGSTD::string pqxx::to_string (const T &)
 Convert built-in type to a readable string that PostgreSQL will understand.
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const short &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const unsigned short &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const int &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const unsigned int &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const long &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const unsigned long &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const float &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const double &)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const bool &)
PGSTD::string pqxx::to_string (const char Obj[])
PGSTD::string pqxx::to_string (const PGSTD::stringstream &Obj)
PGSTD::string pqxx::to_string (const PGSTD::string &Obj)
template<>
PGSTD::string PQXX_LIBEXPORT pqxx::to_string (const char &)
template<>
PGSTD::string pqxx::to_string (const signed char &Obj)
template<>
PGSTD::string pqxx::to_string (const unsigned char &Obj)
template<typename ITER, typename ACCESS>
PGSTD::string pqxx::separated_list (const PGSTD::string &sep, ITER begin, ITER end, ACCESS access)
 Access iterators using ACCESS functor, returning separator-separated list.
template<typename ITER>
PGSTD::string pqxx::separated_list (const PGSTD::string &sep, ITER begin, ITER end)
 Render sequence as a string, using given separator between items.
template<typename OBJ>
PGSTD::string pqxx::separated_list (const PGSTD::string &sep, OBJ *begin, OBJ *end)
 Render array as a string, using given separator between items.
template<typename CONTAINER>
PGSTD::string pqxx::separated_list (const PGSTD::string &sep, const CONTAINER &c)
 Render items in a container as a string, using given separator.
template<typename T>
const char * pqxx::internal::FmtString (T t) PQXX_DEPRECATED
 C-style format strings for various built-in types.
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)
template<typename T>
PGSTD::string pqxx::ToString (const T &Obj) PQXX_DEPRECATED
 Convert object of built-in type to string.
template<>
PGSTD::string pqxx::ToString (const PGSTD::string &Obj)
template<>
PGSTD::string pqxx::ToString (const char *const &Obj)
template<>
PGSTD::string pqxx::ToString (char *const &Obj)
template<>
PGSTD::string pqxx::ToString (const unsigned char *const &Obj)
template<>
PGSTD::string pqxx::ToString (const bool &Obj)
template<>
PGSTD::string pqxx::ToString (const short &Obj)
template<>
PGSTD::string pqxx::ToString (const unsigned short &Obj)
template<typename T>
void pqxx::FromString (const char Str[], T &Obj) PQXX_DEPRECATED
 Convert string to object of built-in type.
PGSTD::string pqxx::internal::escape_string (const char str[], size_t maxlen)
 Internal string-escaping function; does not deal with encodings well.
void PQXX_LIBEXPORT pqxx::internal::FromString_string (const char Str[], PGSTD::string &Obj) PQXX_DEPRECATED
 For libpqxx internal use only: convert C string to C++ string.
void PQXX_LIBEXPORT pqxx::internal::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 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 *.
template<>
void pqxx::FromString (const char Str[], PGSTD::string &Obj)
template<>
void pqxx::FromString (const char Str[], const char *&Obj)
template<>
void pqxx::FromString (const char Str[], const unsigned char *&Obj)
template<>
void pqxx::FromString (const char Str[], bool &Obj)
PGSTD::string PQXX_LIBEXPORT pqxx::sqlesc (const char str[])
 Escape nul-terminated string for inclusion in SQL strings.
PGSTD::string PQXX_LIBEXPORT pqxx::sqlesc (const char str[], size_t maxlen)
 Escape string for inclusion in SQL strings.
PGSTD::string PQXX_LIBEXPORT pqxx::sqlesc (const PGSTD::string &)
 Escape string for inclusion in SQL strings.
template<typename T>
PGSTD::string pqxx::Quote (const T &Obj, bool EmptyIsNull) PQXX_DEPRECATED
 Quote string for use in SQL.
template<>
PGSTD::string pqxx::Quote (const PGSTD::string &Obj, bool EmptyIsNull) PQXX_DEPRECATED
 std::string version, on which the other versions are built
template<>
PGSTD::string pqxx::Quote (const char *const &Obj, bool EmptyIsNull) PQXX_DEPRECATED
 Special case for const char *, accepting null pointer as null value.
template<int LEN>
PGSTD::string pqxx::Quote (const char(&Obj)[LEN], bool EmptyIsNull) PQXX_DEPRECATED
 Specialization for string constants.
template<typename T>
PGSTD::string pqxx::Quote (T Obj) PQXX_DEPRECATED
 Quote string for use in SQL.
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.
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.

Variables

const oid pqxx::oid_none = 0
 The "null" oid.
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 Sun Jun 18 15:06:08 2006 for libpqxx by  doxygen 1.4.6