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

Method ReadSqlStatement

pkg/sql/plpgsql/parser/lexer.go:430–438  ·  view source on GitHub ↗
(
	terminator1 int, terminators ...int,
)

Source from the content-addressed store, hash-verified

428}
429
430func (l *lexer) ReadSqlStatement(
431 terminator1 int, terminators ...int,
432) (sqlStr string, terminatorMet int, err error) {
433 var startPos, endPos int
434 startPos, endPos, terminatorMet, err = l.readSQLConstruct(
435 false /* isExpr */, false /* allowEmpty */, terminator1, terminators...,
436 )
437 return l.getStr(startPos, endPos), terminatorMet, err
438}
439
440// findFirstOccurrence searches from the current position for occurrences of the
441// supplied tokens, returning the first one found. The cursor is not advanced

Callers 3

MakeFetchOrMoveStmtMethod · 0.95
ParseMethod · 0.80

Calls 2

readSQLConstructMethod · 0.95
getStrMethod · 0.95

Tested by

no test coverage detected