SOMEDAY: If we store the index name as Tuple encoded bytes, prefix comparision would be faster
| 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) { |
| 805 | if (prefix.size() > indexKeys.size()) |
| 806 | return false; |
| 807 | |
| 808 | for (int i = 0; i < prefix.size(); i++) { |
| 809 | if (indexKeys[i].first != prefix[i]) { |
| 810 | return false; |
| 811 | } |
| 812 | } |
| 813 | return true; |
| 814 | } |