Explorar o código

query: close the iter and return that iter from scan

Chris Bannister %!s(int64=10) %!d(string=hai) anos
pai
achega
6dffce9a73
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      session.go

+ 1 - 1
session.go

@@ -756,7 +756,7 @@ func (q *Query) PageState(state []byte) *Query {
 // Exec executes the query without returning any rows.
 func (q *Query) Exec() error {
 	iter := q.Iter()
-	return iter.err
+	return iter.Close()
 }
 
 func isUseStatement(stmt string) bool {