From 1c7f380ec24fd2f64da74d941962429353e67ae8 Mon Sep 17 00:00:00 2001 From: Raul-Mircea Date: Thu, 23 Jan 2020 14:25:37 +0100 Subject: [PATCH] Fix --- table_and_query.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/table_and_query.go b/table_and_query.go index 2ea29cb5..d442ce4d 100644 --- a/table_and_query.go +++ b/table_and_query.go @@ -2,7 +2,6 @@ package gorm import ( "strings" - "time" ) // TableAndQuery returns the table name and the query already formatted as a string @@ -10,8 +9,9 @@ func (scope *Scope) TableAndQuery() (string, string) { scope.InstanceSet("skip_bindvar", true) scope.prepareQuerySQL() - qs := LogFormatter("sql", "q", time.Duration(1), scope.SQL, scope.SQLVars, int64(1)) - t, q := scope.TableName(), qs[3].(string) + //qs := LogFormatter("sql", "q", time.Duration(1), scope.SQL, scope.SQLVars, int64(1)) + //t, q := scope.TableName(), qs[3].(string) + t, q := scope.TableName(), scope.SQL if t == "" { qsplit := strings.Fields(strings.ToLower(q)) for i := range qsplit {