From 7f7826a86791fbbad5095d5081019b4fe10cc897 Mon Sep 17 00:00:00 2001 From: Raul-Mircea Date: Mon, 27 Jan 2020 14:37:31 +0100 Subject: [PATCH] Fix --- table_and_query.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/table_and_query.go b/table_and_query.go index a456f540..b6214e11 100644 --- a/table_and_query.go +++ b/table_and_query.go @@ -6,11 +6,15 @@ import ( ) // TableAndQuery returns the table name and the query already formatted as a string -func (scope Scope) TableAndQuery() (string, string) { +func (scope *Scope) TableAndQuery() (string, string) { scope.InstanceSet("skip_bindvar", true) //qs := LogFormatter("sql", "q", time.Duration(1), scope.SQL, scope.SQLVars, int64(1)) //t, q := scope.TableName(), qs[3].(string) + if scope.SQL == "" { + fmt.Println("### HIT ###") + scope.prepareQuerySQL() + } fmt.Println("#####", scope.SQL) t, q := scope.TableName(), scope.SQL if t == "" {