(depth int, sql string)
| 106 | } |
| 107 | |
| 108 | func (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 | |
| 119 | func (p *Parser) scanOneStmt() (sql string, tokens []sqlSymType, done bool) { |
| 120 | var lval sqlSymType |
no test coverage detected