summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-xorm/xorm/rows.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-05-02 03:50:33 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-05-02 08:50:33 +0800
commit3792867955f590661469cc23c16e14e9d6fabb85 (patch)
treef0a9f68dde00c818d86adddce099a7122844f63f /vendor/github.com/go-xorm/xorm/rows.go
parent0144817971012bed2b00784064c37b1e7e5acff3 (diff)
downloadgitea-3792867955f590661469cc23c16e14e9d6fabb85.tar.gz
gitea-3792867955f590661469cc23c16e14e9d6fabb85.zip
Update xorm to latest version (#1651)
* Update xorm to latest version * Update xorm/builder
Diffstat (limited to 'vendor/github.com/go-xorm/xorm/rows.go')
-rw-r--r--vendor/github.com/go-xorm/xorm/rows.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/go-xorm/xorm/rows.go b/vendor/github.com/go-xorm/xorm/rows.go
index a91d08b779..47bc322f3d 100644
--- a/vendor/github.com/go-xorm/xorm/rows.go
+++ b/vendor/github.com/go-xorm/xorm/rows.go
@@ -34,7 +34,10 @@ func newRows(session *Session, bean interface{}) (*Rows, error) {
var sqlStr string
var args []interface{}
- rows.session.Statement.setRefValue(rValue(bean))
+ if err := rows.session.Statement.setRefValue(rValue(bean)); err != nil {
+ return nil, err
+ }
+
if len(session.Statement.TableName()) <= 0 {
return nil, ErrTableNotFound
}
@@ -113,7 +116,9 @@ func (rows *Rows) Scan(bean interface{}) error {
}
dataStruct := rValue(bean)
- rows.session.Statement.setRefValue(dataStruct)
+ if err := rows.session.Statement.setRefValue(dataStruct); err != nil {
+ return err
+ }
_, err := rows.session.row2Bean(rows.rows, rows.fields, len(rows.fields), bean, &dataStruct, rows.session.Statement.RefTable)
return err