(statement string)
| 132 | } |
| 133 | |
| 134 | func getCaretPosition(statement string) (string, int, int) { |
| 135 | lines := strings.Split(statement, "\n") |
| 136 | for i, line := range lines { |
| 137 | if offset := strings.Index(line, "|"); offset != -1 { |
| 138 | newLine := strings.Replace(line, "|", "", 1) |
| 139 | lines[i] = newLine |
| 140 | return strings.Join(lines, "\n"), i + 1, offset |
| 141 | } |
| 142 | } |
| 143 | panic("caret position not found") |
| 144 | } |
| 145 | |
| 146 | var databaseMetadatas = []*storepb.DatabaseSchemaMetadata{ |
| 147 | { |
no test coverage detected