#include <binarystring.hxx>
Related Functions |
(Note that these are not member functions.)
|
std::string | escape_binary (const std::string &bin) |
| Escape binary string for inclusion in SQL.
|
std::string | escape_binary (const char bin[]) |
| Escape binary string for inclusion in SQL.
|
std::string | escape_binary (const char bin[], size_t len) |
| Escape binary string for inclusion in SQL.
|
std::string | escape_binary (const unsigned char bin[]) |
| Escape binary string for inclusion in SQL.
|
std::string | escape_binary (const unsigned char bin[], size_t len) |
| Escape binary string for inclusion in SQL.
|
Additional Inherited Members |
typedef unsigned char | content_type |
| PQAlloc () throw () |
| PQAlloc (const PQAlloc &rhs) throw () |
| PQAlloc (unsigned char *obj) throw () |
| Assume ownership of a pointer.
|
| ~PQAlloc () throw () |
PQAlloc & | operator= (const PQAlloc &rhs) throw () |
void | swap (PQAlloc &rhs) throw () |
| operator bool () const throw () |
| Is this pointer non-null?
|
bool | operator! () const throw () |
| Is this pointer null?
|
unsigned char * | operator-> () const throw (std::logic_error) |
| Dereference pointer.
|
unsigned char & | operator* () const throw (std::logic_error) |
| Dereference pointer.
|
unsigned char * | get () const throw () |
| Obtain underlying pointer.
|
void | reset () throw () |
Member Typedef Documentation
Constructor & Destructor Documentation
pqxx::binarystring::binarystring |
( |
const field & |
F | ) |
|
|
explicit |
pqxx::binarystring::binarystring |
( |
const std::string & |
s | ) |
|
|
explicit |
pqxx::binarystring::binarystring |
( |
const void * |
binary_data, |
|
|
size_t |
len |
|
) |
| |
Member Function Documentation
const value_type* pqxx::binarystring::data |
( |
| ) |
const throw () |
bool pqxx::binarystring::empty |
( |
| ) |
const throw () |
const char* pqxx::binarystring::get |
( |
| ) |
const throw () |
Raw character buffer (no terminating zero is added)
- Warning
- No terminating zero is added! If the binary data did not end in a null character, you will not find one here.
size_type pqxx::binarystring::length |
( |
| ) |
const throw () |
Size of converted string in bytes.
bool pqxx::binarystring::operator== |
( |
const binarystring & |
rhs | ) |
const throw () |
size_type pqxx::binarystring::size |
( |
| ) |
const throw () |
string pqxx::binarystring::str |
( |
| ) |
const |
Read as regular C++ string (may include null characters)
- Warning
- libpqxx releases before 3.1 stored the string and returned a reference to it. This is no longer the case! It now creates and returns a new string object. Avoid repeated use of this function; retrieve your string once and keep it in a local variable. Also, do not expect to be able to compare the string's address to that of an earlier invocation.
Swap contents with other binarystring.
The documentation for this class was generated from the following files: