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