isSelectOrWithStatement checks if the statement is a SELECT or WITH statement
(statement string)
| 200 | |
| 201 | // isSelectOrWithStatement checks if the statement is a SELECT or WITH statement |
| 202 | func isSelectOrWithStatement(statement string) bool { |
| 203 | trimmedStatement := strings.ToLower(strings.TrimLeftFunc(statement, unicode.IsSpace)) |
| 204 | return strings.HasPrefix(trimmedStatement, "select") || strings.HasPrefix(trimmedStatement, "with") |
| 205 | } |
| 206 | |
| 207 | // addLimitFor12cAndLater adds a FETCH NEXT clause for Oracle 12c and later versions. |
| 208 | // Uses the modern SQL standard approach, falling back to 11g approach on error. |
no outgoing calls
no test coverage detected