MCPcopy Create free account
hub / github.com/bytebase/bytebase / procedureDefinitionsEqual

Function procedureDefinitionsEqual

backend/plugin/schema/differ.go:2336–2350  ·  view source on GitHub ↗

procedureDefinitionsEqual compares procedure definitions with normalization

(def1, def2, _ string)

Source from the content-addressed store, hash-verified

2334
2335// procedureDefinitionsEqual compares procedure definitions with normalization
2336func procedureDefinitionsEqual(def1, def2, _ string) bool {
2337 if def1 == def2 {
2338 return true
2339 }
2340
2341 // Try PostgreSQL normalization first
2342 norm1 := normalizePostgreSQLFunction(def1)
2343 norm2 := normalizePostgreSQLFunction(def2)
2344 if norm1 == norm2 {
2345 return true
2346 }
2347
2348 // For other engines, fall back to simple comparison
2349 return false
2350}
2351
2352// sortDiffLists sorts all diff lists to ensure stable output order
2353func sortDiffLists(diff *MetadataDiff) {

Callers 1

compareProceduresFunction · 0.85

Calls 1

Tested by

no test coverage detected