Messy commit. Testing suff and some improvements to how data is shown.
This commit is contained in:
parent
bebb3391c3
commit
3a13b7ffb4
59 changed files with 2045 additions and 716 deletions
39
pgsql/Pgsql_Col.h
Normal file
39
pgsql/Pgsql_Col.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef PGSQL_COL_H
|
||||
#define PGSQL_COL_H
|
||||
|
||||
#include "Pgsql_Row.h"
|
||||
|
||||
namespace Pgsql {
|
||||
|
||||
class Col {
|
||||
public:
|
||||
explicit Col(Pgsql::Row &r)
|
||||
: row(r)
|
||||
{}
|
||||
|
||||
void reset() { col = -1; }
|
||||
Pgsql::Value nextValue()
|
||||
{
|
||||
return row.get(++col);
|
||||
}
|
||||
private:
|
||||
Pgsql::Row &row;
|
||||
int col = -1;
|
||||
};
|
||||
|
||||
// template <typename T>
|
||||
// void operator<<(T &s, Col &c)
|
||||
// {
|
||||
// s << c.nextValue();
|
||||
// }
|
||||
|
||||
template <typename T>
|
||||
Col& operator>>(Col &c, T &s)
|
||||
{
|
||||
s << c.nextValue();
|
||||
return c;
|
||||
}
|
||||
|
||||
} // end namespace Pgsql
|
||||
|
||||
#endif // PGSQL_COL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue