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

Function GetFunctionComparer

backend/plugin/schema/function_comparer.go:90–100  ·  view source on GitHub ↗

GetFunctionComparer returns the function comparer for a specific engine. If no engine-specific comparer is registered, it returns the default comparer.

(engine storepb.Engine)

Source from the content-addressed store, hash-verified

88// GetFunctionComparer returns the function comparer for a specific engine.
89// If no engine-specific comparer is registered, it returns the default comparer.
90func GetFunctionComparer(engine storepb.Engine) FunctionComparer {
91 functionComparerRegistryMux.RLock()
92 defer functionComparerRegistryMux.RUnlock()
93
94 if comparer, exists := functionComparerRegistry[engine]; exists {
95 return comparer
96 }
97
98 // Return default comparer if no engine-specific one is registered
99 return &DefaultFunctionComparer{}
100}
101
102func init() {
103 // Register default comparers for engines that don't need specialized logic

Callers 1

compareFunctionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected