( sql string, nakedIntType *types.T, comments commentsMode, )
| 73 | } |
| 74 | |
| 75 | func (p *Parser) parseOneWithInt( |
| 76 | sql string, nakedIntType *types.T, comments commentsMode, |
| 77 | ) (statements.Statement[tree.Statement], error) { |
| 78 | stmts, err := p.parseWithDepth(1, sql, nakedIntType, comments) |
| 79 | if err != nil { |
| 80 | return statements.Statement[tree.Statement]{}, err |
| 81 | } |
| 82 | if len(stmts) != 1 { |
| 83 | return statements.Statement[tree.Statement]{}, errors.AssertionFailedf("expected 1 statement, but found %d", len(stmts)) |
| 84 | } |
| 85 | return stmts[0], nil |
| 86 | } |
| 87 | |
| 88 | func (p *Parser) scanOneStmt() (sql string, tokens []sqlSymType, done bool) { |
| 89 | tokens = p.tokBuf[:0] |
no test coverage detected