Functor to bind SQL columns to a data object
class Example
{
public: // tablename.columnname:
int exampleInt; // DB_EXAMPLE.INT_VALUE
string exampleStr; // DB_EXAMPLE.STRING_VALUE
double exampleDouble; // DB_EXAMPLE.DOUBLE_VALUE
long exampleLong; // DB_EXAMPLE.EXAMPLE_LONG
TIMESTAMP_STRUCT exampleDate; // DB_EXAMPLE.EXAMPLE_DATE
};
class BCAExampleObj { public: void operator()(BoundIOs &boundIOs, Example &rowbuf) { boundIOs["INT_VALUE"] == rowbuf.exampleInt; boundIOs["STRING_VALUE"] == rowbuf.exampleStr; boundIOs["DOUBLE_VALUE"] == rowbuf.exampleDouble; boundIOs["EXAMPLE_LONG"] == rowbuf.exampleLong; boundIOs["EXAMPLE_DATE"] == rowbuf.exampleDate; } };