(statement string, caretLine int, caretOffset int, tricky bool)
| 40 | } |
| 41 | |
| 42 | func computeSQLAndByteOffset(statement string, caretLine int, caretOffset int, tricky bool) (string, int) { |
| 43 | var sql string |
| 44 | var newLine, newOffset int |
| 45 | if tricky { |
| 46 | sql, newLine, newOffset = skipHeadingSQLs(statement, caretLine, caretOffset) |
| 47 | sql, newLine, newOffset = skipHeadingSQLWithoutSemicolon(sql, newLine, newOffset) |
| 48 | } else { |
| 49 | sql, newLine, newOffset = skipHeadingSQLs(statement, caretLine, caretOffset) |
| 50 | } |
| 51 | return sql, lineColumnToByteOffset(sql, newLine, newOffset) |
| 52 | } |
| 53 | |
| 54 | func lineColumnToByteOffset(sql string, line, column int) int { |
| 55 | currentLine := 1 |
no test coverage detected