diff --git a/table_and_query.go b/table_and_query.go index b6214e11..cc1299be 100644 --- a/table_and_query.go +++ b/table_and_query.go @@ -6,7 +6,8 @@ import ( ) // TableAndQuery returns the table name and the query already formatted as a string -func (scope *Scope) TableAndQuery() (string, string) { +func (db *DB) TableAndQuery() (string, string) { + scope := db.NewScope(db) 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)