Signature is func (db *DB) Query(query string, args ...interface{}) (*Rows, error)
.
What does Go func (*DB) Query
return if the query and call is:
rows, err := db.Query("SELECT username FROM userstable WHERE username=$1", registerInstance.Username)
when there is no such row in the table userstable
.
Does it return a non-nil error
or return empty string value as Result
and non-nil error
is returned only when an error occurs?