(query string)
| 42 | var n1qlQueryRegex = regexp.MustCompile(`^\s*\(*(?i:SELECT)\b`) |
| 43 | |
| 44 | func validateN1QLQuery(query string) error { |
| 45 | if n1qlQueryRegex.MatchString(query) { |
| 46 | return nil |
| 47 | } else { |
| 48 | return fmt.Errorf("only SELECT queries are allowed") |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func (fn *n1qlInvocation) Iterate() (sgbucket.QueryResultIterator, error) { |
| 53 | var userArg n1qlUserArgument |
no test coverage detected