readdatanomatches.cpp
来自「The goal of this library is to make ODBC」· C++ 代码 · 共 22 行
CPP
22 行
#include "ReadDataNoMatches.h"
// should return an empty vector of Example objects as we're feeding the view
// a query that should return no matches
vector<Example> ReadDataNoMatches()
{
vector<Example> results;
// as INT_VALUE < INT_VALUE is never true, no rows will be returned by the query
DBView<Example> view("DB_EXAMPLE", DefaultBCA<Example>(),
"WHERE INT_VALUE < INT_VALUE");
DBView<Example>::select_iterator read_it = view.begin();
for ( ; read_it != view.end(); ++read_it)
{
results.push_back(*read_it);
}
return results;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?