columnsOf converts storepb columns into omni catalog columns (names normalized).
(columns []*storepb.ColumnMetadata)
| 166 | // columnsOf converts storepb columns into omni catalog columns (names |
| 167 | // normalized). |
| 168 | func columnsOf(columns []*storepb.ColumnMetadata) []*catalog.Column { |
| 169 | out := make([]*catalog.Column, 0, len(columns)) |
| 170 | for _, c := range columns { |
| 171 | if c == nil { |
| 172 | continue |
| 173 | } |
| 174 | out = append(out, catalog.NewColumn(catalog.Normalize(c.Name), c.Type, c.Nullable)) |
| 175 | } |
| 176 | return out |
| 177 | } |
| 178 | |
| 179 | // convertCandidateType maps an omni completion candidate type onto the bytebase |
| 180 | // base.CandidateType. A Trino catalog corresponds to a bytebase DATABASE. |
no outgoing calls
no test coverage detected