MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / parseOneWithDepth

Method parseOneWithDepth

pkg/sql/parser/parse.go:108–117  ·  view source on GitHub ↗
(depth int, sql string)

Source from the content-addressed store, hash-verified

106}
107
108func (p *Parser) parseOneWithDepth(depth int, sql string) (Statement, error) {
109 stmts, err := p.parseWithDepth(1, sql, defaultNakedIntType)
110 if err != nil {
111 return Statement{}, err
112 }
113 if len(stmts) != 1 {
114 return Statement{}, errors.AssertionFailedf("expected 1 statement, but found %d", len(stmts))
115 }
116 return stmts[0], nil
117}
118
119func (p *Parser) scanOneStmt() (sql string, tokens []sqlSymType, done bool) {
120 var lval sqlSymType

Callers 1

ParseOneFunction · 0.95

Calls 1

parseWithDepthMethod · 0.95

Tested by

no test coverage detected