1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-06-23 00:17:47 +02:00

implements next rows result set support

This commit is contained in:
gedi
2017-02-08 17:35:32 +02:00
parent 42ab7c33d0
commit 128bf5c539
6 changed files with 178 additions and 60 deletions

20
rows_go18.go Normal file
View File

@ -0,0 +1,20 @@
// +build go1.8
package sqlmock
import "io"
// Implement the "RowsNextResultSet" interface
func (rs *rowSets) HasNextResultSet() bool {
return rs.pos+1 < len(rs.sets)
}
// Implement the "RowsNextResultSet" interface
func (rs *rowSets) NextResultSet() error {
if !rs.HasNextResultSet() {
return io.EOF
}
rs.pos++
return nil
}