| 64 | } |
| 65 | |
| 66 | Status AddField(int64_t id, std::vector<int> field_path) { |
| 67 | const auto pair = field_path_to_id.emplace(FieldPath(std::move(field_path)), id); |
| 68 | if (!pair.second) { |
| 69 | return Status::KeyError("Field already mapped to id"); |
| 70 | } |
| 71 | return Status::OK(); |
| 72 | } |
| 73 | |
| 74 | Result<int64_t> GetFieldId(std::vector<int> field_path) const { |
| 75 | const auto it = field_path_to_id.find(FieldPath(std::move(field_path))); |