| 2128 | } |
| 2129 | |
| 2130 | std::vector<FieldPath> FieldRef::FindAll(const Schema& schema) const { |
| 2131 | if (auto name = this->name()) { |
| 2132 | return internal::MapVector([](int i) { return FieldPath{i}; }, |
| 2133 | schema.GetAllFieldIndices(*name)); |
| 2134 | } |
| 2135 | return FindAll(schema.fields()); |
| 2136 | } |
| 2137 | |
| 2138 | std::vector<FieldPath> FieldRef::FindAll(const Field& field) const { |
| 2139 | return FindAll(field.type()->fields()); |