MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ToTableName

Method ToTableName

pkg/sql/sem/tree/name_part.go:308–318  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
308func (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.

Callers 5

FormatMethod · 0.95
ParseMethod · 0.80
ParseQualifiedTableNameFunction · 0.80
ResolveMethod · 0.80
ResolveMethod · 0.80

Calls 1

NameTypeAlias · 0.85

Tested by

no test coverage detected