#include <result.hxx>
Public Types | |
typedef unsigned int | size_type |
typedef signed int | difference_type |
typedef const_fielditerator | const_iterator |
typedef const_iterator | iterator |
typedef field | reference |
typedef const_fielditerator | pointer |
typedef const_reverse_fielditerator | const_reverse_iterator |
typedef const_reverse_iterator | reverse_iterator |
Public Member Functions | |
tuple (const result *r, result::size_type i) throw () | |
~tuple () throw () | |
const_iterator | begin () const throw () |
const_iterator | end () const throw () |
size_type | size () const throw () |
void | swap (tuple &) throw () |
result::size_type | rownumber () const throw () |
result::size_type | num () const |
tuple | slice (size_type Begin, size_type End) const |
bool | empty () const throw () |
Comparison | |
bool | operator== (const tuple &) const throw () |
bool | operator!= (const tuple &rhs) const throw () |
Field access | |
reference | front () const throw () |
reference | back () const throw () |
const_reverse_fielditerator | rbegin () const |
const_reverse_fielditerator | rend () const |
reference | operator[] (size_type i) const throw () |
reference | operator[] (int i) const throw () |
reference | operator[] (const char f[]) const |
reference | operator[] (const std::string &s) const |
reference | at (size_type) const throw (range_error) |
reference | at (int i) const throw (range_error) |
reference | at (const char[]) const |
reference | at (const std::string &s) const |
Column information | |
size_type | column_number (const std::string &ColName) const |
Number of given column (throws exception if it doesn't exist). | |
size_type | column_number (const char[]) const |
Number of given column (throws exception if it doesn't exist). | |
oid | column_type (size_type ColNum) const |
Type of given column. | |
oid | column_type (int ColNum) const |
Type of given column. | |
oid | column_type (const std::string &ColName) const |
Type of given column. | |
oid | column_type (const char ColName[]) const |
Type of given column. | |
oid | column_table (size_type ColNum) const |
What table did this column come from? Requires PostgreSQL 7.4 C API. | |
oid | column_table (int ColNum) const |
What table did this column come from? Requires PostgreSQL 7.4 C API. | |
oid | column_table (const std::string &ColName) const |
What table did this column come from? Requires PostgreSQL 7.4 C API. | |
size_type | table_column (size_type ColNum) const |
What column number in its table did this result column come from? | |
size_type | table_column (int ColNum) const |
What column number in its table did this result column come from? | |
size_type | table_column (const std::string &ColName) const |
What column number in its table did this result column come from? | |
Protected Attributes | |
const result * | m_Home |
result::size_type | m_Index |
size_type | m_Begin |
size_type | m_End |
Friends | |
class | field |
A tuple represents one row (also called a tuple) in a query result set. It also acts as a container mapping column numbers or names to field values (see below):
The tuple itself acts like a (non-modifyable) container, complete with its own const_iterator and const_reverse_iterator.
typedef unsigned int pqxx::result::tuple::size_type |
Reimplemented in pqxx::result::const_iterator.
typedef signed int pqxx::result::tuple::difference_type |
Reimplemented in pqxx::result::const_iterator.
typedef field pqxx::result::tuple::reference |
Reimplemented in pqxx::result::const_iterator.
Reimplemented in pqxx::result::const_iterator.
pqxx::result::tuple::tuple | ( | const result * | r, | |
result::size_type | i | |||
) | throw () |
pqxx::result::tuple::~tuple | ( | ) | throw () |
bool pqxx::result::tuple::operator== | ( | const tuple & | rhs | ) | const throw () |
bool pqxx::result::tuple::operator!= | ( | const tuple & | rhs | ) | const throw () |
const_iterator pqxx::result::tuple::begin | ( | ) | const throw () |
Referenced by rend().
const_iterator pqxx::result::tuple::end | ( | ) | const throw () |
Referenced by rbegin().
reference pqxx::result::tuple::front | ( | ) | const throw () |
reference pqxx::result::tuple::back | ( | ) | const throw () |
result::tuple::const_reverse_iterator pqxx::result::tuple::rbegin | ( | ) | const |
References end().
result::tuple::const_reverse_iterator pqxx::result::tuple::rend | ( | ) | const |
References begin().
reference pqxx::result::tuple::operator[] | ( | int | i | ) | const throw () |
reference pqxx::result::tuple::operator[] | ( | const char | f[] | ) | const |
reference pqxx::result::tuple::operator[] | ( | const std::string & | s | ) | const |
pqxx::result::field pqxx::result::tuple::at | ( | size_type | i | ) | const throw (range_error) |
References operator[](), and size().
reference pqxx::result::tuple::at | ( | int | i | ) | const throw (range_error) |
pqxx::result::field pqxx::result::tuple::at | ( | const | char[] | ) | const |
References column_number(), field, and m_Begin.
reference pqxx::result::tuple::at | ( | const std::string & | s | ) | const |
void pqxx::result::tuple::swap | ( | tuple & | rhs | ) | throw () |
result::size_type pqxx::result::tuple::rownumber | ( | ) | const throw () |
size_type pqxx::result::tuple::column_number | ( | const std::string & | ColName | ) | const |
pqxx::result::tuple::size_type pqxx::result::tuple::column_number | ( | const | char[] | ) | const |
Number of given column (throws exception if it doesn't exist).
References pqxx::result::column_name(), pqxx::result::column_number(), m_Begin, m_End, m_Home, and pqxx::result::result().
oid pqxx::result::tuple::column_type | ( | int | ColNum | ) | const |
Type of given column.
oid pqxx::result::tuple::column_type | ( | const std::string & | ColName | ) | const |
Type of given column.
oid pqxx::result::tuple::column_type | ( | const char | ColName[] | ) | const |
Type of given column.
What table did this column come from? Requires PostgreSQL 7.4 C API.
Only defined if the libpqxx library was compiled against a libpq version that supports the PQftable
function.
If you get a link error saying this function is undefined, that must be because libpqxx was compiled against an older version of libpq. The PQftable
function first became available in PostgreSQL 7.4.
oid pqxx::result::tuple::column_table | ( | int | ColNum | ) | const |
What table did this column come from? Requires PostgreSQL 7.4 C API.
Only defined if the libpqxx library was compiled against a libpq version that supports the PQftable
function.
If you get a link error saying this function is undefined, that must be because libpqxx was compiled against an older version of libpq. The PQftable
function first became available in PostgreSQL 7.4.
oid pqxx::result::tuple::column_table | ( | const std::string & | ColName | ) | const |
What table did this column come from? Requires PostgreSQL 7.4 C API.
Only defined if the libpqxx library was compiled against a libpq version that supports the PQftable
function.
If you get a link error saying this function is undefined, that must be because libpqxx was compiled against an older version of libpq. The PQftable
function first became available in PostgreSQL 7.4.
What column number in its table did this result column come from?
A meaningful answer can be given only if the column in question comes directly from a column in a table. If the column is computed in any other way, a logic_error will be thrown.
ColNum | a zero-based column number in this result set |
size_type pqxx::result::tuple::table_column | ( | int | ColNum | ) | const |
What column number in its table did this result column come from?
size_type pqxx::result::tuple::table_column | ( | const std::string & | ColName | ) | const |
What column number in its table did this result column come from?
result::size_type pqxx::result::tuple::num | ( | ) | const |
Referenced by pqxx::result::const_iterator::operator-().
pqxx::result::tuple pqxx::result::tuple::slice | ( | size_type | Begin, | |
size_type | End | |||
) | const |
Produce a slice of this tuple, containing the given range of columns.
The slice runs from the range's starting column to the range's end column, exclusive. It looks just like a normal result tuple, except slices can be empty.
References m_Begin, m_End, pqxx::result::result(), and size().
const result* pqxx::result::tuple::m_Home [protected] |
Referenced by column_number().
result::size_type pqxx::result::tuple::m_Index [protected] |
Referenced by pqxx::result::const_iterator::operator++(), and pqxx::result::const_iterator::operator--().
size_type pqxx::result::tuple::m_Begin [protected] |
Referenced by at(), column_number(), empty(), and slice().
size_type pqxx::result::tuple::m_End [protected] |
Referenced by column_number(), empty(), and slice().