提交 9171a641 编写于 作者: X Xu Peng 提交者: xj.lin

feat(db): impl has_group


Former-commit-id: 8b58eef49cc7b1f328f8d2bd3bd42077cd6bf427
上级 1b4ccfdb
......@@ -91,8 +91,15 @@ Status DBMetaImpl::get_group(GroupSchema& group_info) {
return Status::OK();
}
Status DBMetaImpl::has_group(const std::string& group_id_, bool& has_or_not_) {
//PXU TODO
Status DBMetaImpl::has_group(const std::string& group_id, bool& has_or_not) {
auto groups = ConnectorPtr->select(columns(&GroupSchema::id),
where(c(&GroupSchema::group_id) == group_id));
assert(groups.size() <= 1);
if (groups.size() == 1) {
has_or_not = true;
} else {
has_or_not = false;
}
return Status::OK();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册