IsQueryIdempotent parses the query string and determines if the query is idempotent
(query string)
| 179 | |
| 180 | // IsQueryIdempotent parses the query string and determines if the query is idempotent |
| 181 | func IsQueryIdempotent(query string) (idempotent bool, err error) { |
| 182 | var l lexer |
| 183 | l.init(query) |
| 184 | return isIdempotentStmt(&l, l.next()) |
| 185 | } |
| 186 | |
| 187 | func isIdempotentStmt(l *lexer, t token) (idempotent bool, err error) { |
| 188 | switch t { |