This commit is contained in:
Raul-Mircea 2020-01-27 14:26:50 +01:00
parent 6e4b99677c
commit 91d8421ca7

View File

@ -1,6 +1,7 @@
package gorm
import (
"fmt"
"strings"
)
@ -10,9 +11,7 @@ func (scope Scope) TableAndQuery() (string, string) {
//qs := LogFormatter("sql", "q", time.Duration(1), scope.SQL, scope.SQLVars, int64(1))
//t, q := scope.TableName(), qs[3].(string)
if scope.SQL == "" {
scope.prepareQuerySQL()
}
fmt.Println("#####", scope.SQL)
t, q := scope.TableName(), scope.SQL
if t == "" {
qsplit := strings.Fields(strings.ToLower(q))