simplify IsOracle()

This commit is contained in:
Jim Lambert 2020-02-12 14:44:34 -05:00
parent de34a5f3a2
commit 5b26d4ba08

View File

@ -8,7 +8,6 @@ import (
"fmt" "fmt"
"reflect" "reflect"
"regexp" "regexp"
"sort"
"strings" "strings"
"time" "time"
) )
@ -1426,10 +1425,5 @@ func (scope *Scope) hasConditions() bool {
} }
func (scope *Scope) IsOracle() bool { func (scope *Scope) IsOracle() bool {
oraModules := []string{"godror", "oci8", "ora"} // must be an asc sorted slice return scope.Dialect().GetName() == "oci8"
insertAt := sort.SearchStrings(oraModules, scope.Dialect().GetName())
if insertAt < len(oraModules) && oraModules[insertAt] == scope.Dialect().GetName() {
return true
}
return false
} }