MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / peekForExecute

Method peekForExecute

pkg/sql/plpgsql/parser/lexer.go:412–418  ·  view source on GitHub ↗

peekForExecute checks whether the next token is EXECUTE, used to identify dynamic SQL statements.

()

Source from the content-addressed store, hash-verified

410// peekForExecute checks whether the next token is EXECUTE, used to identify
411// dynamic SQL statements.
412func (l *lexer) peekForExecute() bool {
413 if l.parser.Lookahead() != -1 {
414 // Push back the lookahead token so that it can be included.
415 l.PushBack(1)
416 }
417 return l.Peek().id == EXECUTE
418}
419
420func (l *lexer) ReadSqlExpr(
421 terminator1 int, terminators ...int,

Callers 1

ParseMethod · 0.80

Calls 3

PushBackMethod · 0.95
PeekMethod · 0.95
LookaheadMethod · 0.65

Tested by

no test coverage detected