MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / FQString

Method FQString

pkg/sql/sem/tree/object_name.go:79–92  ·  view source on GitHub ↗

FQString renders the table name in full, not omitting the prefix schema and catalog names. Suitable for logging, etc.

()

Source from the content-addressed store, hash-verified

77// FQString renders the table name in full, not omitting the prefix
78// schema and catalog names. Suitable for logging, etc.
79func (o *objName) FQString() string {
80 ctx := NewFmtCtx(FmtSimple)
81 schemaName := o.SchemaName.String()
82 // The pg_catalog and pg_extension schemas cannot be referenced from inside
83 // an anonymous ("") database. This makes their FQ string always relative.
84 if schemaName != catconstants.PgCatalogName && schemaName != catconstants.PgExtensionSchemaName {
85 ctx.FormatNode(&o.CatalogName)
86 ctx.WriteByte('.')
87 }
88 ctx.FormatNode(&o.SchemaName)
89 ctx.WriteByte('.')
90 ctx.FormatNode(&o.ObjectName)
91 return ctx.CloseAndGetString()
92}
93
94// Format implements the NodeFormatter interface.
95func (o *objName) Format(ctx *FmtCtx) {

Callers

nothing calls this directly

Calls 4

FormatNodeMethod · 0.95
CloseAndGetStringMethod · 0.95
NewFmtCtxFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected