ns -> database.collection
| 65 | |
| 66 | // ns -> database.collection |
| 67 | Namespace getDBCollectionPair(const char* ns, std::pair<std::string, std::string> errMsg) { |
| 68 | const auto dotPtr = strchr(ns, '.'); |
| 69 | if (dotPtr == nullptr) { |
| 70 | TraceEvent(SevWarn, "WireBadCollectionName").detail(errMsg.first, errMsg.second).suppressFor(1.0); |
| 71 | throw wire_protocol_mismatch(); |
| 72 | } |
| 73 | return std::make_pair(std::string(ns, dotPtr - ns), std::string(dotPtr + 1)); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * query := { $bool_op : [ query* ], * (a predicate) |
no outgoing calls
no test coverage detected