mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 06:55:27 +08:00
feat(db): impl has_group
Former-commit-id: 785fb73b07ef58017a6e1f04cd2f997f43f89b88
This commit is contained in:
parent
92e30f4e7a
commit
a8a1d3abcd
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user