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

Function funcSignatureKey

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

funcSignatureKey returns a stable, comparable identifier for a function signature. Uses the metadata Signature string when present; falls back to the definition hash to keep distinct overloads distinguishable even when sync emitted an empty Signature field.

(fn *storepb.FunctionMetadata)

Source from the content-addressed store, hash-verified

115// the definition hash to keep distinct overloads distinguishable even when
116// sync emitted an empty Signature field.
117func funcSignatureKey(fn *storepb.FunctionMetadata) string {
118 if fn == nil {
119 return ""
120 }
121 if fn.Signature != "" {
122 return fn.Signature
123 }
124 return fn.Definition
125}
126
127func kindLabel(k objectKind) string {
128 switch k {

Callers 2

keyMethod · 0.85
sortKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected