simplify IsOracle()
This commit is contained in:
parent
de34a5f3a2
commit
5b26d4ba08
8
scope.go
8
scope.go
@ -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
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user