From bfb62815459796ef0747b867f20c21f4a034befa Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Wed, 22 Aug 2018 21:55:43 +0200 Subject: [PATCH] Propagate errors from SQL row reading Currently errors while data is being read are being swallowed and result in a truncated result set, this fixes that and properly returns an error and not an incomplete result. --- session_get.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/session_get.go b/session_get.go index 3b2c9493..69194a23 100644 --- a/session_get.go +++ b/session_get.go @@ -77,6 +77,9 @@ func (session *Session) nocacheGet(beanKind reflect.Kind, table *core.Table, bea defer rows.Close() if !rows.Next() { + if rows.Err() != nil { + return false, rows.Err() + } return false, nil }