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

Method sortKey

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

sortKey returns the intra-SCC lexicographic key. Matches hard contract C10. For functions the signature is appended so overloads have distinct sort keys and the install order is fully deterministic.

()

Source from the content-addressed store, hash-verified

103// For functions the signature is appended so overloads have distinct sort
104// keys and the install order is fully deterministic.
105func (e *objectEntry) sortKey() string {
106 base := e.schema + "\x00" + e.name + "\x00" + kindLabel(e.kind)
107 if e.kind == kindFunction {
108 base += "\x00" + funcSignatureKey(e.funcMeta)
109 }
110 return base
111}
112
113// funcSignatureKey returns a stable, comparable identifier for a function
114// signature. Uses the metadata Signature string when present; falls back to

Callers 3

topoSortObjectsFunction · 0.45
sortedSCCMembersFunction · 0.45
minSortKeyFunction · 0.45

Calls 2

kindLabelFunction · 0.85
funcSignatureKeyFunction · 0.85

Tested by

no test coverage detected