If there is an error with the SQLair syntax in the query run with One() it will return ErrNoRows rather than that error, there was also no check for a query error at the start of One, this has been fixed by adding in an error check to the q function in Query.
There was also a possible error with Decode not checking for iter.rows == nil. I've added a check for this and tests for the method order.
I found a few bugs while testing. These were:
One()
it will return ErrNoRows rather than that error, there was also no check for a query error at the start ofOne
, this has been fixed by adding in an error check to theq
function inQuery
.Decode
not checking foriter.rows == nil
. I've added a check for this and tests for the method order.