MCPcopy Index your code
hub / github.com/bytebase/bytebase / installOne

Method installOne

backend/plugin/parser/pg/query_span_loader.go:530–543  ·  view source on GitHub ↗

installOne attempts a real install; on failure installs a pseudo at the same slot. All outcomes are recorded in l.degraded / l.trulyBroken; this function never returns an error to the caller because per-object failures are not fatal to the loader. Functions are a special case: when a function's rea

(obj *objectEntry)

Source from the content-addressed store, hash-verified

528// overload resolution and losing body-level lineage. Tables/views/types are
529// fine to pseudo-install because their lookups only need the object to exist.
530func (l *catalogLoader) installOne(obj *objectEntry) {
531 realErr := l.installReal(obj)
532 if realErr == nil {
533 return
534 }
535 l.degraded[obj.key()] = realErr
536 if obj.kind == kindFunction {
537 // No pseudo — rely on tryMetadataFuncLookup at query time.
538 return
539 }
540 if pErr := l.installPseudo(obj); pErr != nil {
541 l.trulyBroken[obj.key()] = pErr
542 }
543}
544
545// installReal translates the object's metadata into an AST and calls the
546// matching omni DefineX / ExecCreateTableAs / CreateFunctionStmt. Returns

Callers 1

LoadMethod · 0.95

Calls 3

installRealMethod · 0.95
installPseudoMethod · 0.95
keyMethod · 0.45

Tested by

no test coverage detected