(typeName string)
| 29 | } |
| 30 | |
| 31 | func (p *typeProvider) findSchema(typeName string) (bigquery.Schema, bool) { |
| 32 | typeNames := strings.Split(typeName, ".") |
| 33 | schema, found := p.schemas[typeNames[0]] |
| 34 | if !found { |
| 35 | return nil, false |
| 36 | } |
| 37 | for _, tn := range typeNames[1:] { |
| 38 | var s *bigquery.Schema |
| 39 | for _, fieldSchema := range schema { |
| 40 | if fieldSchema.Name == tn { |
| 41 | s = &fieldSchema.Schema |
| 42 | break |
| 43 | } |
| 44 | } |
| 45 | if s == nil { |
| 46 | return nil, false |
| 47 | } |
| 48 | schema = *s |
| 49 | } |
| 50 | return schema, true |
| 51 | } |
| 52 | |
| 53 | func (p *typeProvider) FindType(typeName string) (*exprpb.Type, bool) { |
| 54 | _, found := p.findSchema(typeName) |
no outgoing calls
no test coverage detected