⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultselval.htm

📁 The goal of this library is to make ODBC recordsets look just like an STL container. As a user, you
💻 HTM
字号:
<pre><code><span class="codeComment">//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.</span>
template&lt;class DataObj&gt; class DefaultSelValidate {
public:
bool operator()(BoundIOs &amp;boundIOs,DataObj &amp;rowbuf)
{
	for (BoundIOs::iterator b_it = boundIOs.begin();
				b_it != boundIOs.end(); b_it++)
	{
		BoundIO &amp;boundIO = (*b_it).second;
		if (boundIO.IsColumn() &amp;&amp; boundIO.IsNull())
			return false;  <span class="codeComment">// found null column ... data is invalid</span>
	}

	return true;	<span class="codeComment">// no nulls found ... data is OK</span>
}
};

</code></pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -