(statement string, caretLine int, caretOffset int, tricky bool)
| 83 | } |
| 84 | |
| 85 | func computeSQLAndByteOffset(statement string, caretLine int, caretOffset int, tricky bool) (string, int) { |
| 86 | sql, newLine, newOffset := skipHeadingSQLs(statement, caretLine, caretOffset) |
| 87 | if tricky { |
| 88 | sql, newLine, newOffset = skipHeadingSQLWithoutSemicolon(sql, newLine, newOffset) |
| 89 | } |
| 90 | return sql, lineColumnToByteOffset(sql, newLine, newOffset) |
| 91 | } |
| 92 | |
| 93 | func lineColumnToByteOffset(sql string, line, column int) int { |
| 94 | currentLine := 1 |