(stmt ast.Statement, transform string)
| 22 | ) |
| 23 | |
| 24 | func getSelect(stmt ast.Statement, transform string) (*ast.SelectStatement, error) { |
| 25 | sel, ok := stmt.(*ast.SelectStatement) |
| 26 | if !ok { |
| 27 | return nil, &ErrUnsupportedStatement{Transform: transform, Got: stmtTypeName(stmt)} |
| 28 | } |
| 29 | return sel, nil |
| 30 | } |
| 31 | |
| 32 | // AddColumn returns a Rule that appends a column expression to the SELECT list of |
| 33 | // a SELECT statement. The expression may be any valid AST expression node such as |
no test coverage detected