(n parser.IReturning_clauseContext)
| 924 | } |
| 925 | |
| 926 | func (c *cc) convertReturning_caluseContext(n parser.IReturning_clauseContext) *ast.List { |
| 927 | list := &ast.List{Items: []ast.Node{}} |
| 928 | if n == nil { |
| 929 | return list |
| 930 | } |
| 931 | |
| 932 | r, ok := n.(*parser.Returning_clauseContext) |
| 933 | if !ok { |
| 934 | return list |
| 935 | } |
| 936 | |
| 937 | for _, exp := range r.AllExpr() { |
| 938 | list.Items = append(list.Items, &ast.ResTarget{ |
| 939 | Indirection: &ast.List{}, |
| 940 | Val: c.convert(exp), |
| 941 | }) |
| 942 | } |
| 943 | |
| 944 | for _, star := range r.AllSTAR() { |
| 945 | list.Items = append(list.Items, &ast.ResTarget{ |
| 946 | Indirection: &ast.List{}, |
| 947 | Val: &ast.ColumnRef{ |
| 948 | Fields: &ast.List{ |
| 949 | Items: []ast.Node{&ast.A_Star{}}, |
| 950 | }, |
| 951 | Location: star.GetSymbol().GetStart(), |
| 952 | }, |
| 953 | Location: star.GetSymbol().GetStart(), |
| 954 | }) |
| 955 | } |
| 956 | |
| 957 | return list |
| 958 | } |
| 959 | |
| 960 | func (c *cc) convertInsert_stmtContext(n *parser.Insert_stmtContext) ast.Node { |
| 961 | tableName := identifier(n.Table_name().GetText()) |
no test coverage detected