SAP / go-ase

SAP ASE Database Client for Go
Apache License 2.0
25 stars 14 forks source link

Handle empty rows #157

Closed ntnn closed 3 years ago

ntnn commented 3 years ago

Description

@fwilhelm92 found a hang in database/sql when executing a .Query method on database/sql that doesn't yield any rows. We traced that to database/sql's inability to handle a nil rows. Additionally I've found that database/sql panics on a nil rows on db.Query methods.

This PR changes the purego implementation to always return a valid driver.Rows and handles being effectively empty.

Related issues

Link any related issues here.

Tests