(self, query, document)
| 837 | raise MongoModelException("Cannot apply $pullAll to a non-array field.", code=10142) |
| 838 | |
| 839 | def evaluate(self, query, document): |
| 840 | acc = True |
| 841 | if len(query) == 0: |
| 842 | return len(document) == 0 |
| 843 | for field in query.keys(): |
| 844 | if field == '_id': |
| 845 | tmp = OrderedDict() |
| 846 | for k,v in sorted(query[field].items(), key= lambda i: i[0]): |
| 847 | tmp[k] = v |
| 848 | acc = acc and evaluate(field, tmp, document, self.options, True) |
| 849 | else: |
| 850 | acc = acc and evaluate(field, query[field], document, self.options, True) |
| 851 | return acc |
| 852 | |
| 853 | def process_update_operator_pull(self, key, update_expression): |
| 854 | # print "Update Operator: $pull ", update |
no test coverage detected