Return the count of records for the specified criteria. :param criteria: A JSON object representing the find query. No limit support. :param source: (Optional) The DNS record source ("ssl","virustotal","sonar_dns",etc.) :return: The cursor from the find operation
(self, criteria, source)
| 250 | return check |
| 251 | |
| 252 | def find_count(self, criteria, source): |
| 253 | """ |
| 254 | Return the count of records for the specified criteria. |
| 255 | |
| 256 | :param criteria: A JSON object representing the find query. No limit support. |
| 257 | :param source: (Optional) The DNS record source ("ssl","virustotal","sonar_dns",etc.) |
| 258 | :return: The cursor from the find operation |
| 259 | """ |
| 260 | if source != None: |
| 261 | criteria["sources.source"] = source |
| 262 | |
| 263 | check = self._mongo_connector.perform_count(self.all_dns_collection, criteria) |
| 264 | return check |
| 265 | |
| 266 | def remove_by_domain_and_source(self, domain, dns_type, dns_value, source): |
| 267 | """ |