Modify the creation of models

This commit is contained in:
antao 2018-11-23 23:46:58 +08:00
parent d1a3f263e2
commit 5028f0f38f
1 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,11 @@ void create_model::createModelClassFromPG(const std::string &path, const DbClien
AND table_name = $1"
<< tableName << Mode::Blocking >>
[&](const Result &r) {
if (r.size() == 0)
{
std::cout << " ---Can't create model from the table " << tableName << ", please check privileges on the table." << std::endl;
return;
}
for (size_t i = 0; i < r.size(); i++)
{
auto row = r[i];