Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5238:367e8af46cfd db-protobuf
added "HasLabels" in /system
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Apr 2023 10:02:19 +0200 |
parents | cd2258ca7894 |
children | 72dfa0ac84eb |
comparison
equal
deleted
inserted
replaced
5237:cd2258ca7894 | 5238:367e8af46cfd |
---|---|
1959 resourcesList_, NULL, tuple.get<1>(), tuple.get<2>(), tuple.get<3>(), tuple.get<4>(), tuple.get<5>()); | 1959 resourcesList_, NULL, tuple.get<1>(), tuple.get<2>(), tuple.get<3>(), tuple.get<4>(), tuple.get<5>()); |
1960 } | 1960 } |
1961 } | 1961 } |
1962 }; | 1962 }; |
1963 | 1963 |
1964 if ((!withLabels.empty() || !withoutLabels.empty()) && | |
1965 !db_.HasLabelsSupport()) | |
1966 { | |
1967 throw OrthancException(ErrorCode_NotImplemented, "The database backend doesn't support labels"); | |
1968 } | |
1964 | 1969 |
1965 std::vector<DatabaseConstraint> normalized; | 1970 std::vector<DatabaseConstraint> normalized; |
1966 NormalizeLookup(normalized, lookup, queryLevel); | 1971 NormalizeLookup(normalized, lookup, queryLevel); |
1967 | 1972 |
1968 Operations operations; | 1973 Operations operations; |
3628 } | 3633 } |
3629 | 3634 |
3630 Operations operations(publicId, level, label, operation); | 3635 Operations operations(publicId, level, label, operation); |
3631 Apply(operations); | 3636 Apply(operations); |
3632 } | 3637 } |
3638 | |
3639 | |
3640 bool StatelessDatabaseOperations::HasLabelsSupport() | |
3641 { | |
3642 boost::shared_lock<boost::shared_mutex> lock(mutex_); | |
3643 return db_.HasLabelsSupport(); | |
3644 } | |
3633 } | 3645 } |