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