getColumnIndices first sort the columns in the table alphabetically, and then returns the indices of the columns satisfying the criteria function
(info *sqlTable, criteria criteriaFunc)
| 58 | // getColumnIndices first sort the columns in the table alphabetically, and then |
| 59 | // returns the indices of the columns satisfying the criteria function |
| 60 | func getColumnIndices(info *sqlTable, criteria criteriaFunc) []*columnIdx { |
| 61 | indices := make([]*columnIdx, 0) |
| 62 | for i, column := range info.columnNames { |
| 63 | if criteria(info, column) { |
| 64 | indices = append(indices, &columnIdx{ |
| 65 | name: column, |
| 66 | index: i, |
| 67 | }) |
| 68 | } |
| 69 | } |
| 70 | return indices |
| 71 | } |
| 72 | |
| 73 | type columnIdx struct { |
| 74 | name string // the column name |
no outgoing calls
no test coverage detected
searching dependent graphs…