(depth int, sql string)
| 117 | } |
| 118 | |
| 119 | func (p *Parser) parseOneWithDepth(depth int, sql string) (Statement, error) { |
| 120 | stmts, err := p.parseWithDepth(1, sql, defaultNakedIntType) |
| 121 | if err != nil { |
| 122 | return Statement{}, err |
| 123 | } |
| 124 | if len(stmts) > 1 { |
| 125 | return Statement{}, errors.AssertionFailedf("expected 1 statement, but found %d", len(stmts)) |
| 126 | } else if len(stmts) == 0 { |
| 127 | return Statement{}, vitess.ErrEmpty |
| 128 | } |
| 129 | return stmts[0], nil |
| 130 | } |
| 131 | |
| 132 | func (p *Parser) scanOneStmt(parse func(sqlStr string, tokens []sqlSymType) error) bool { |
| 133 | var lval sqlSymType |
no test coverage detected