Removed debug statments
This commit is contained in:
parent
f179cddafb
commit
a80bfb8bc5
@ -83,8 +83,6 @@ func Query(scope *Scope) {
|
|||||||
|
|
||||||
scope.Err(rows.Scan(values...))
|
scope.Err(rows.Scan(values...))
|
||||||
|
|
||||||
//log.Println("result values", values)
|
|
||||||
|
|
||||||
for index, column := range columns {
|
for index, column := range columns {
|
||||||
value := values[index]
|
value := values[index]
|
||||||
if field, ok := fields[column]; ok {
|
if field, ok := fields[column]; ok {
|
||||||
|
@ -31,8 +31,8 @@ func TestFirstAndLast(t *testing.T) {
|
|||||||
t.Errorf("Find first record as slice")
|
t.Errorf("Find first record as slice")
|
||||||
}
|
}
|
||||||
|
|
||||||
if DB.Joins("left join emails on emails.user_id = users.id").First(&User{}).Error != nil {
|
if err := DB.Joins("left join emails on emails.user_id = users.id").First(&User{}).Error; err != nil {
|
||||||
t.Errorf("Should not raise any error when order with Join table")
|
t.Errorf("Should not raise any error when order with Join table: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
scope.go
6
scope.go
@ -4,9 +4,7 @@ import (
|
|||||||
"database/sql/driver"
|
"database/sql/driver"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime/debug"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -106,8 +104,6 @@ func (scope *Scope) Dialect() Dialect {
|
|||||||
// Err write error
|
// Err write error
|
||||||
func (scope *Scope) Err(err error) error {
|
func (scope *Scope) Err(err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("ERR", err)
|
|
||||||
debug.PrintStack()
|
|
||||||
scope.db.AddError(err)
|
scope.db.AddError(err)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
@ -365,8 +361,6 @@ func (scope *Scope) InstanceGet(name string) (interface{}, bool) {
|
|||||||
// Trace print sql log
|
// Trace print sql log
|
||||||
func (scope *Scope) Trace(t time.Time) {
|
func (scope *Scope) Trace(t time.Time) {
|
||||||
if len(scope.Sql) > 0 {
|
if len(scope.Sql) > 0 {
|
||||||
// TODO(d4l3k): Remove this line
|
|
||||||
log.Println("sql", scope.Sql, scope.SqlVars)
|
|
||||||
scope.db.slog(scope.Sql, t, scope.SqlVars...)
|
scope.db.slog(scope.Sql, t, scope.SqlVars...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user