MCPcopy Create free account
hub / github.com/datastax/cql-proxy / IsQueryIdempotent

Function IsQueryIdempotent

parser/parser.go:181–185  ·  view source on GitHub ↗

IsQueryIdempotent parses the query string and determines if the query is idempotent

(query string)

Source from the content-addressed store, hash-verified

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

Callers 9

checkIdempotentMethod · 0.92
isBatchIdempotentMethod · 0.92
TestParserFunction · 0.85

Calls 3

initMethod · 0.95
nextMethod · 0.95
isIdempotentStmtFunction · 0.85

Tested by 5

TestParserFunction · 0.68