22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
25 #include "pqxx/except"
34 class const_tuple_iterator;
35 class const_reverse_tuple_iterator;
73 bool PQXX_PURE operator==(
const tuple &)
const throw ();
74 bool operator!=(const
tuple &rhs) const throw ()
75 {
return !operator==(rhs); }
78 const_iterator begin()
const throw ();
79 const_iterator end() const throw ();
85 reference front() const throw ();
86 reference back() const throw ();
91 reference operator[](size_type) const throw ();
92 reference operator[](
int) const throw ();
93 reference operator[](const
char[]) const;
94 reference operator[](const PGSTD::
string &) const;
95 reference at(size_type) const throw (pqxx::
range_error);
96 reference at(
int) const throw (pqxx::range_error);
97 reference at(const
char[]) const;
98 reference at(const PGSTD::
string &) const;
102 {
return m_End-m_Begin; }
104 void swap(
tuple &) throw ();
106 size_t rownumber() const throw () {
return m_Index; }
113 size_type column_number(
const PGSTD::string &ColName)
const
117 size_type column_number(
const char[])
const;
120 oid column_type(size_type)
const;
123 oid column_type(
int ColNum)
const
127 oid column_type(
const PGSTD::string &ColName)
const
131 oid column_type(
const char ColName[])
const
135 oid column_table(size_type ColNum)
const;
138 oid column_table(
int ColNum)
const
141 oid column_table(
const PGSTD::string &ColName)
const
155 size_type table_column(size_type)
const;
162 size_type table_column(
const PGSTD::string &ColName)
const
166 size_t num()
const {
return rownumber(); }
180 tuple slice(size_type Begin, size_type End)
const;
183 bool PQXX_PURE empty()
const throw ();
200 public PGSTD::iterator<PGSTD::random_access_iterator_tag,
205 typedef PGSTD::iterator<PGSTD::random_access_iterator_tag,
236 { m_col = size_type(difference_type(m_col) + i);
return *
this; }
238 { m_col = size_type(difference_type(m_col) - i);
return *
this; }
246 {
return col()==i.col();}
248 {
return col()!=i.col();}
250 {
return col()<i.col();}
252 {
return col()<=i.col();}
254 {
return col()>i.col();}
256 {
return col()>=i.col();}
281 using iterator_type::iterator_category;
283 using iterator_type::pointer;
285 using iterator_type::value_type;
289 typedef field value_type;
290 typedef const field &reference;
299 iterator_type PQXX_PURE base()
const throw ();
305 using iterator_type::operator->;
306 using iterator_type::operator*;
315 { iterator_type::operator=(r);
return *
this; }
317 { iterator_type::operator--();
return *
this; }
320 { iterator_type::operator++();
return *
this; }
323 { iterator_type::operator-=(i);
return *
this; }
325 { iterator_type::operator+=(i);
return *
this; }
338 {
return rhs.const_tuple_iterator::operator-(*this); }
347 {
return iterator_type::operator==(rhs); }
350 {
return !operator==(rhs); }
353 {
return iterator_type::operator>(rhs); }
355 {
return iterator_type::operator>=(rhs); }
357 {
return iterator_type::operator<(rhs); }
359 {
return iterator_type::operator<=(rhs); }
364 inline const_tuple_iterator
368 tuple(home(), idx()),
369 size_type(difference_type(col()) + o));
376 inline const_tuple_iterator
380 tuple(home(), idx()),
381 size_type(difference_type(col()) - o));
386 {
return difference_type(num() - i.
num()); }
406 #include "pqxx/compiler-internal-post.hxx"