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

Method key

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

key returns a canonical kind-prefixed identifier used for dependency lookups and set membership. Tables, views, and matviews share a namespace (relation namespace in PG), so they use the same prefix "rel:". Functions are identified by schema, name AND signature so that overloaded names (e.g. `publi

()

Source from the content-addressed store, hash-verified

86// names (e.g. `public.fn(int4)` and `public.fn(text)`) do not collide and
87// collapse into a single entry during topo-sort bookkeeping.
88func (e *objectEntry) key() string {
89 switch e.kind {
90 case kindSchema:
91 return "schema:" + e.schema
92 case kindEnum:
93 return "type:" + e.schema + "." + e.name
94 case kindTable, kindView, kindMatView:
95 return "rel:" + e.schema + "." + e.name
96 case kindFunction:
97 return "func:" + e.schema + "." + e.name + "|" + funcSignatureKey(e.funcMeta)
98 }
99 return "unknown:" + e.schema + "." + e.name
100}
101
102// sortKey returns the intra-SCC lexicographic key. Matches hard contract C10.
103// For functions the signature is appended so overloads have distinct sort

Callers 13

classifyFunction · 0.45
migratePrefixKeysFunction · 0.45
migrateUIScopeKeysFunction · 0.45
migrateSqlEditorTabKeysFunction · 0.45
migrateSqlEditorConnKeysFunction · 0.45
migrateUserStorageFunction · 0.45
keysMethod · 0.45
LoadMethod · 0.45
topoSortObjectsFunction · 0.45
buildDependencyEdgesFunction · 0.45
tarjanSCCFunction · 0.45
installOneMethod · 0.45

Calls 1

funcSignatureKeyFunction · 0.85

Tested by 1