Explorar el Código

query: close the iter and return that iter from scan

Chris Bannister hace 10 años
padre
commit
6dffce9a73
Se han modificado 1 ficheros con 1 adiciones y 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 {