//Default SelVal function to make sure fields in a row selected from the database are valid

// Default select validation behavior ... data is valid if and only if
// there are no columns which are null.
// If there are other checks you wish to make, put them in
// your own SelVal functor.
// You can also specialize this template if you wish to have different default behavior
// for your data class.
template<class DataObj> class DefaultSelValidate {
public:
bool operator()(BoundIOs &boundIOs,DataObj &rowbuf)
{
	for (BoundIOs::iterator b_it = boundIOs.begin();
				b_it != boundIOs.end(); b_it++)
	{
		BoundIO &boundIO = (*b_it).second;
		if (boundIO.IsColumn() && boundIO.IsNull())
			return false;  // found null column ... data is invalid
	}

	return true;	// no nulls found ... data is OK
}
};