You've already forked go-sqlmock
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:
20
rows_go18.go
Normal file
20
rows_go18.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user