ToTableName converts the unresolved name to a table name. TODO(radu): the schema and catalog names might not be in the right places; we would only figure that out during name resolution. This method is temporary, while we change all the code paths to only use TableName after resolution.
()
| 306 | // would only figure that out during name resolution. This method is temporary, |
| 307 | // while we change all the code paths to only use TableName after resolution. |
| 308 | func (u *UnresolvedObjectName) ToTableName() TableName { |
| 309 | return TableName{tblName{ |
| 310 | TableName: Name(u.Parts[0]), |
| 311 | TableNamePrefix: TableNamePrefix{ |
| 312 | SchemaName: Name(u.Parts[1]), |
| 313 | CatalogName: Name(u.Parts[2]), |
| 314 | ExplicitSchema: u.NumParts >= 2, |
| 315 | ExplicitCatalog: u.NumParts >= 3, |
| 316 | }, |
| 317 | }} |
| 318 | } |
| 319 | |
| 320 | // ToUnresolvedName converts the unresolved object name to the more general |
| 321 | // unresolved name. |