| 493 | } |
| 494 | |
| 495 | Reference<IPredicate> eq_predicate(const bson::BSONElement& el, const std::string& prefix) { |
| 496 | DataValue dv; |
| 497 | |
| 498 | if (!el.isABSONObj()) { |
| 499 | dv = DataValue(el); |
| 500 | } else if (el.type() == bson::BSONType::Array) { |
| 501 | dv = DataValue(bson::BSONArray(el.Obj())); |
| 502 | } else { |
| 503 | dv = DataValue(sortBsonObj(el.Obj())); |
| 504 | } |
| 505 | |
| 506 | return any_predicate(prefix, ref(new EqPredicate(dv))); |
| 507 | } |
| 508 | |
| 509 | Reference<IPredicate> re_predicate(const bson::BSONElement& el, const std::string& prefix) { |
| 510 | std::string regexPattern; |
no test coverage detected