| 145 | struct ExtValueOperatorSize { |
| 146 | static const char* name; |
| 147 | static Reference<IPredicate> toPredicate(std::string const& unencoded_path, bson::BSONElement const& element) { |
| 148 | return ref(new AnyPredicate(ref(new ExtPathExpression(unencoded_path, false, false)), |
| 149 | ref(new ArraySizePredicate(element.Number())))); |
| 150 | } |
| 151 | }; |
| 152 | REGISTER_VALUE_OPERATOR(ExtValueOperatorSize, "$size"); |
| 153 |