MCPcopy Create free account
hub / github.com/bytebase/bytebase / grab

Function grab

backend/plugin/parser/tsql/batch/parse.go:11–16  ·  view source on GitHub ↗

* * 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)

Source from the content-addressed store, hash-verified

9
10// grab grabs i from r, or returns 0 if 1 >= end.
11func 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

Callers 3

NextMethod · 0.85
readStringMethod · 0.85
readCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected