GetViewComparer returns the view comparer for a specific engine. If no engine-specific comparer is registered, it returns the default comparer.
(engine storepb.Engine)
| 137 | // GetViewComparer returns the view comparer for a specific engine. |
| 138 | // If no engine-specific comparer is registered, it returns the default comparer. |
| 139 | func GetViewComparer(engine storepb.Engine) ViewComparer { |
| 140 | if comparer, exists := viewComparerRegistry[engine]; exists { |
| 141 | return comparer |
| 142 | } |
| 143 | return &DefaultViewComparer{} |
| 144 | } |
| 145 | |
| 146 | // init registers the default comparer for common engines. |
| 147 | func init() { |
no outgoing calls
no test coverage detected