(n *parser.Create_table_stmtContext)
| 107 | } |
| 108 | |
| 109 | func (c *cc) convertCreate_table_stmtContext(n *parser.Create_table_stmtContext) ast.Node { |
| 110 | stmt := &ast.CreateTableStmt{ |
| 111 | Name: parseTableName(n), |
| 112 | IfNotExists: n.EXISTS_() != nil, |
| 113 | } |
| 114 | for _, idef := range n.AllColumn_def() { |
| 115 | if def, ok := idef.(*parser.Column_defContext); ok { |
| 116 | typeName := "any" |
| 117 | if def.Type_name() != nil { |
| 118 | typeName = def.Type_name().GetText() |
| 119 | } |
| 120 | stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ |
| 121 | Colname: identifier(def.Column_name().GetText()), |
| 122 | IsNotNull: hasNotNullConstraint(def.AllColumn_constraint()), |
| 123 | TypeName: &ast.TypeName{Name: typeName}, |
| 124 | }) |
| 125 | } |
| 126 | } |
| 127 | return stmt |
| 128 | } |
| 129 | |
| 130 | func (c *cc) convertCreate_virtual_table_stmtContext(n *parser.Create_virtual_table_stmtContext) ast.Node { |
| 131 | switch moduleName := n.Module_name().GetText(); moduleName { |
no test coverage detected