(sql string, loc oracleast.Loc)
| 306 | } |
| 307 | |
| 308 | func hasOracleFetchKeyword(sql string, loc oracleast.Loc) bool { |
| 309 | segment := sql[loc.Start:loc.End] |
| 310 | lexer := oracleparser.NewLexer(segment) |
| 311 | for { |
| 312 | tok := lexer.NextToken() |
| 313 | if tok.Loc == tok.End && tok.End >= len(segment) { |
| 314 | return false |
| 315 | } |
| 316 | if tok.Loc < 0 || tok.End > len(segment) || tok.End <= tok.Loc { |
| 317 | return false |
| 318 | } |
| 319 | if strings.EqualFold(segment[tok.Loc:tok.End], "FETCH") { |
| 320 | return true |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | func extractOracleFetchCount(node oracleast.Node) int { |
| 326 | limit, ok := node.(*oracleast.NumberLiteral) |
no outgoing calls
no test coverage detected