From 97e7703766cb821b4903ddfc0468b21d5b26a717 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 12 Aug 2015 23:11:45 +0800 Subject: [PATCH] bug fixed & comment trace line --- session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/session.go b/session.go index 714efc03..3e26bba6 100644 --- a/session.go +++ b/session.go @@ -1767,7 +1767,7 @@ func (session *Session) _row2Bean(rows *core.Rows, fields []string, fieldsCount t := vv.Convert(core.TimeType).Interface().(time.Time) z, _ := t.Zone() if len(z) == 0 || t.Year() == 0 { // !nashtsai! HACK tmp work around for lib/pq doesn't properly time with location - session.Engine.LogDebug("empty zone key[%v] : %v | zone: %v | location: %+v\n", key, t, z, *t.Location()) + session.Engine.LogDebugf("empty zone key[%v] : %v | zone: %v | location: %+v\n", key, t, z, *t.Location()) t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), time.Local) } @@ -1789,7 +1789,7 @@ func (session *Session) _row2Bean(rows *core.Rows, fields []string, fieldsCount // !! 增加支持sql.Scanner接口的结构,如sql.NullString hasAssigned = true if err := nulVal.Scan(vv.Interface()); err != nil { - fmt.Println("sql.Sanner error:", err.Error()) + //fmt.Println("sql.Sanner error:", err.Error()) session.Engine.LogError("sql.Sanner error:", err.Error()) hasAssigned = false }