| 789 | } |
| 790 | |
| 791 | IndexInfo::IndexInfo(std::string indexName, |
| 792 | std::vector<std::pair<std::string, int>> indexKeys, |
| 793 | Reference<UnboundCollectionContext> collectionCx, |
| 794 | IndexStatus status, |
| 795 | Optional<UID> buildId, |
| 796 | bool isUniqueIndex) |
| 797 | : indexName(indexName), indexKeys(indexKeys), status(status), buildId(buildId), isUniqueIndex(isUniqueIndex) { |
| 798 | indexCx = |
| 799 | collectionCx->getIndexesContext()->getSubContext(DataValue(indexName, DVTypeCode::STRING).encode_key_part()); |
| 800 | multikey = true; |
| 801 | } |
| 802 | |
| 803 | // SOMEDAY: If we store the index name as Tuple encoded bytes, prefix comparision would be faster |
| 804 | bool IndexInfo::hasPrefix(std::vector<std::string> const& prefix) { |
nothing calls this directly
no test coverage detected