* * parse.go contains the logic of parsing a SQL batch. * The original code can be found at https://sourcegraph.com/github.com/microsoft/go-sqlcmd@fb920dc0da056e58969696128b440e2bf99c105b/-/blob/pkg/sqlcmd/batch.go?L76-170. */ grab grabs i from r, or returns 0 if 1 >= end.
(r []rune, i, end int)
| 9 | |
| 10 | // grab grabs i from r, or returns 0 if 1 >= end. |
| 11 | func grab(r []rune, i, end int) rune { |
| 12 | if i < end { |
| 13 | return r[i] |
| 14 | } |
| 15 | return 0 |
| 16 | } |
| 17 | |
| 18 | // readCommand reads to the next control character to find |
| 19 | // a command in the string. Command regexes constrain matches |
no outgoing calls
no test coverage detected