(tableName *ast.TableName)
| 140 | } |
| 141 | |
| 142 | func (c *Catalog) getTable(tableName *ast.TableName) (*Schema, *Table, error) { |
| 143 | schemaName := tableName.Schema |
| 144 | if schemaName == "" { |
| 145 | schemaName = c.DefaultSchema |
| 146 | } |
| 147 | var schema *Schema |
| 148 | for i := range c.Schemas { |
| 149 | if c.Schemas[i].Name == schemaName { |
| 150 | schema = c.Schemas[i] |
| 151 | break |
| 152 | } |
| 153 | } |
| 154 | if schema == nil { |
| 155 | return nil, nil, sqlerr.SchemaNotFound(schemaName) |
| 156 | } |
| 157 | table, _, err := schema.getTable(tableName) |
| 158 | if err != nil { |
| 159 | return nil, nil, err |
| 160 | } |
| 161 | return schema, table, nil |
| 162 | } |
| 163 | |
| 164 | func isStmtImplemented(stmt *ast.AlterTableStmt) bool { |
| 165 | var implemented bool |
no test coverage detected