(n *parser.Create_view_stmtContext)
| 172 | } |
| 173 | |
| 174 | func (c *cc) convertCreate_view_stmtContext(n *parser.Create_view_stmtContext) ast.Node { |
| 175 | viewName := n.View_name().GetText() |
| 176 | relation := &ast.RangeVar{ |
| 177 | Relname: &viewName, |
| 178 | } |
| 179 | |
| 180 | if n.Schema_name() != nil { |
| 181 | schemaName := n.Schema_name().GetText() |
| 182 | relation.Schemaname = &schemaName |
| 183 | } |
| 184 | |
| 185 | return &ast.ViewStmt{ |
| 186 | View: relation, |
| 187 | Aliases: &ast.List{}, |
| 188 | Query: c.convert(n.Select_stmt()), |
| 189 | Replace: false, |
| 190 | Options: &ast.List{}, |
| 191 | WithCheckOption: ast.ViewCheckOption(0), |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | type Delete_stmt interface { |
| 196 | node |
no test coverage detected