Reference to one row in a result. More...
#include <tuple.hxx>
Public Types | |
typedef const_tuple_iterator | const_iterator |
typedef const_reverse_tuple_iterator | const_reverse_iterator |
typedef tuple_difference_type | difference_type |
typedef const_iterator | iterator |
typedef const_tuple_iterator | pointer |
typedef field | reference |
typedef const_reverse_iterator | reverse_iterator |
typedef tuple_size_type | size_type |
Public Member Functions | |
tuple (const result *r, size_t i) throw () | |
~tuple () throw () | |
const_iterator | begin () const throw () |
bool PQXX_PURE | empty () const throw () |
const_iterator | end () const throw () |
size_t | num () const |
size_t | rownumber () const throw () |
size_type | size () const throw () |
tuple | slice (size_type Begin, size_type End) const |
Produce a slice of this tuple, containing the given range of columns. More... | |
void | swap (tuple &) throw () |
Comparison | |
bool PQXX_PURE | operator== (const tuple &) const throw () |
bool | operator!= (const tuple &rhs) const throw () |
Field access | |
reference | front () const throw () |
reference | back () const throw () |
const_reverse_tuple_iterator | rbegin () const |
const_reverse_tuple_iterator | rend () const |
reference | operator[] (size_type) const throw () |
reference | operator[] (int) const throw () |
reference | operator[] (const char[]) const |
reference | operator[] (const PGSTD::string &) const |
reference | at (size_type) const throw (range_error) |
reference | at (int) const throw (range_error) |
reference | at (const char[]) const |
reference | at (const PGSTD::string &) const |
Column information | |
size_type | column_number (const PGSTD::string &ColName) const |
Number of given column (throws exception if it doesn't exist) More... | |
size_type | column_number (const char[]) const |
Number of given column (throws exception if it doesn't exist) More... | |
oid | column_type (size_type) const |
Type of given column. More... | |
oid | column_type (int ColNum) const |
Type of given column. More... | |
oid | column_type (const PGSTD::string &ColName) const |
Type of given column. More... | |
oid | column_type (const char ColName[]) const |
Type of given column. More... | |
oid | column_table (size_type ColNum) const |
What table did this column come from? More... | |
oid | column_table (int ColNum) const |
What table did this column come from? More... | |
oid | column_table (const PGSTD::string &ColName) const |
What table did this column come from? More... | |
size_type | table_column (size_type) const |
What column number in its table did this result column come from? More... | |
size_type | table_column (int ColNum) const |
What column number in its table did this result column come from? More... | |
size_type | table_column (const PGSTD::string &ColName) const |
What column number in its table did this result column come from? More... | |
Protected Attributes | |
size_type | m_Begin |
size_type | m_End |
const result * | m_Home |
size_t | m_Index |
Private Member Functions | |
tuple () | |
Friends | |
class | field |
Reference to one row in a result.
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 const_iterator pqxx::tuple::iterator |
typedef field pqxx::tuple::reference |
pqxx::tuple::tuple | ( | const result * | r, |
size_t | i | ||
) | throw () |
|
inline |
|
private |
reference pqxx::tuple::at | ( | size_type | ) | const throw (range_error) |
reference pqxx::tuple::at | ( | int | ) | const throw (range_error) |
reference pqxx::tuple::at | ( | const char | [] | ) | const |
reference pqxx::tuple::at | ( | const PGSTD::string & | ) | const |
reference pqxx::tuple::back | ( | ) | const throw () |
const_iterator pqxx::tuple::begin | ( | ) | const throw () |
|
inline |
Number of given column (throws exception if it doesn't exist)
References column_number().
Referenced by column_number().
size_type pqxx::tuple::column_number | ( | const char | [] | ) | const |
Number of given column (throws exception if it doesn't exist)
|
inline |
What table did this column come from?
References column_table().
Referenced by column_table().
|
inline |
What table did this column come from?
References column_table().
Referenced by column_table().
|
inline |
Type of given column.
References column_type().
Referenced by column_type().
|
inline |
Type of given column.
References column_type().
Referenced by column_type().
|
inline |
Type of given column.
References column_type().
Referenced by column_type().
bool PQXX_PURE pqxx::tuple::empty | ( | ) | const throw () |
const_iterator pqxx::tuple::end | ( | ) | const throw () |
reference pqxx::tuple::front | ( | ) | const throw () |
|
inline |
|
inline |
reference pqxx::tuple::operator[] | ( | int | ) | const throw () |
reference pqxx::tuple::operator[] | ( | const char | [] | ) | const |
reference pqxx::tuple::operator[] | ( | const PGSTD::string & | ) | const |
const_reverse_tuple_iterator pqxx::tuple::rbegin | ( | ) | const |
const_reverse_tuple_iterator pqxx::tuple::rend | ( | ) | const |
|
inline |
|
inline |
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.
void pqxx::tuple::swap | ( | tuple & | ) | throw () |
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 |
Requires libpq from PostgreSQL 7.4 or better, as well as a server version of at least 7.4.
|
inline |
What column number in its table did this result column come from?
References table_column().
Referenced by table_column().
|
inline |
What column number in its table did this result column come from?
References table_column().
Referenced by table_column().
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |