(e ast.SQLTableExpr)
| 863 | } |
| 864 | |
| 865 | func (c *canon) tableExpr(e ast.SQLTableExpr) { |
| 866 | switch e := e.(type) { |
| 867 | case *ast.SQLFromItem: |
| 868 | c.sqlFromItem(e) |
| 869 | case *ast.SQLCrossJoin: |
| 870 | c.tableExpr(e.Left) |
| 871 | c.ret() |
| 872 | c.write("cross join ") |
| 873 | c.tableExpr(e.Right) |
| 874 | case *ast.SQLJoin: |
| 875 | c.tableExpr(e.Left) |
| 876 | c.ret() |
| 877 | if e.Style != "" { |
| 878 | c.write(e.Style + " ") |
| 879 | } |
| 880 | c.write("join ") |
| 881 | c.tableExpr(e.Right) |
| 882 | c.joinCond(e.Cond) |
| 883 | default: |
| 884 | panic(fmt.Sprintf("unknown from expression: %T", e)) |
| 885 | } |
| 886 | } |
| 887 | |
| 888 | func (c *canon) sqlPipe(pipe *ast.SQLPipe) { |
| 889 | c.open("(") |
no test coverage detected