extractColumnNames extract column names from ResultSetMetadata.RowType.Fields.
(fields []*pb.StructType_Field)
| 275 | |
| 276 | // extractColumnNames extract column names from ResultSetMetadata.RowType.Fields. |
| 277 | func extractColumnNames(fields []*pb.StructType_Field) []string { |
| 278 | var names []string |
| 279 | for _, field := range fields { |
| 280 | names = append(names, field.GetName()) |
| 281 | } |
| 282 | return names |
| 283 | } |
| 284 | |
| 285 | // parseQueryResult parses rows and columnNames from spanner.RowIterator. |
| 286 | // A caller is responsible for calling iterator.Stop(). |