(stmt ast.Statement, colGen columnGenerator)
| 43 | } |
| 44 | |
| 45 | func (c *Catalog) Update(stmt ast.Statement, colGen columnGenerator) error { |
| 46 | if stmt.Raw == nil { |
| 47 | return nil |
| 48 | } |
| 49 | var err error |
| 50 | switch n := stmt.Raw.Stmt.(type) { |
| 51 | |
| 52 | case *ast.AlterTableStmt: |
| 53 | err = c.alterTable(n) |
| 54 | |
| 55 | case *ast.AlterTableSetSchemaStmt: |
| 56 | err = c.alterTableSetSchema(n) |
| 57 | |
| 58 | case *ast.AlterTypeAddValueStmt: |
| 59 | err = c.alterTypeAddValue(n) |
| 60 | |
| 61 | case *ast.AlterTypeRenameValueStmt: |
| 62 | err = c.alterTypeRenameValue(n) |
| 63 | |
| 64 | case *ast.AlterTypeSetSchemaStmt: |
| 65 | err = c.alterTypeSetSchema(n) |
| 66 | |
| 67 | case *ast.CommentOnColumnStmt: |
| 68 | err = c.commentOnColumn(n) |
| 69 | |
| 70 | case *ast.CommentOnSchemaStmt: |
| 71 | err = c.commentOnSchema(n) |
| 72 | |
| 73 | case *ast.CommentOnTableStmt: |
| 74 | err = c.commentOnTable(n) |
| 75 | |
| 76 | case *ast.CommentOnTypeStmt: |
| 77 | err = c.commentOnType(n) |
| 78 | |
| 79 | case *ast.CommentOnViewStmt: |
| 80 | err = c.commentOnView(n) |
| 81 | |
| 82 | case *ast.CompositeTypeStmt: |
| 83 | err = c.createCompositeType(n) |
| 84 | |
| 85 | case *ast.CreateEnumStmt: |
| 86 | err = c.createEnum(n) |
| 87 | |
| 88 | case *ast.CreateExtensionStmt: |
| 89 | err = c.createExtension(n) |
| 90 | |
| 91 | case *ast.CreateFunctionStmt: |
| 92 | err = c.createFunction(n) |
| 93 | |
| 94 | case *ast.CreateSchemaStmt: |
| 95 | err = c.createSchema(n) |
| 96 | |
| 97 | case *ast.CreateTableStmt: |
| 98 | err = c.createTable(n) |
| 99 | |
| 100 | case *ast.CreateTableAsStmt: |
| 101 | err = c.createTableAs(n, colGen) |
| 102 |
no test coverage detected