Example: InsVal for variant_row - check the variant row null flags
and use this to decide whether or not to write NULL values to the database.
template<> class dtl::DefaultInsValidate<variant_row>
{
public:
bool operator()(BoundIOs &boundIOs, variant_row &rowbuf) {
boundIOs.ClearNull();
for (BoundIOs::iterator b_it = boundIOs.begin();
b_it != boundIOs.end(); b_it++)
{
BoundIO &boundIO = (*b_it).second;
if (boundIO.IsParam())
try{
if(rowbuf[boundIO.GetName()].IsNull())
boundIO.SetNull();
else
boundIO.ClearNull();
}
catch(...)
{
boundIO.ClearNull();
}
else
if(rowbuf[boundIO.GetName()].IsNull())
boundIO.SetNull();
else
boundIO.ClearNull();
}
return true;
}
~DefaultInsValidate() {};
};