diff --git a/search.go b/search.go index 2e273584..90138595 100644 --- a/search.go +++ b/search.go @@ -2,7 +2,6 @@ package gorm import ( "fmt" - "regexp" ) type search struct { @@ -73,13 +72,7 @@ func (s *search) Order(value interface{}, reorder ...bool) *search { return s } -var distinctSQLRegexp = regexp.MustCompile(`(?i)distinct[^a-z]+[a-z]+`) - func (s *search) Select(query interface{}, args ...interface{}) *search { - if distinctSQLRegexp.MatchString(fmt.Sprint(query)) { - s.ignoreOrderQuery = true - } - s.selects = map[string]interface{}{"query": query, "args": args} return s }