Find a single record 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)
| 234 | return check |
| 235 | |
| 236 | def find_one(self, criteria, source): |
| 237 | """ |
| 238 | Find a single record for the specified criteria |
| 239 | |
| 240 | :param criteria: A JSON object representing the find query. No limit support. |
| 241 | :param source: (Optional) The DNS record source ("ssl","virustotal","sonar_dns",etc.) |
| 242 | :return: The cursor from the find operation |
| 243 | """ |
| 244 | if source != None: |
| 245 | criteria["sources.source"] = source |
| 246 | |
| 247 | check = self._mongo_connector.perform_find_one( |
| 248 | self.all_dns_collection, criteria |
| 249 | ) |
| 250 | return check |
| 251 | |
| 252 | def find_count(self, criteria, source): |
| 253 | """ |
no test coverage detected