You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It would be nice if Returning function could be nil and if so act is if it's not there.
I use your (awesome) library as a helper func to build queries across my application. In some cases I want to return values like an id or the whole updated row, but then sometimes I don't need to. It doesn't make a lot of sense to create additional logic just for a Returning stmt.
Note: The desired behavior works if the Returning func isn't passed any values .Returning() but if you pass it the value of nil it panics (because of reflect). As a result since this returning clause is in a helper func it will always be passed some value, even if it's just nil.
Describe the solution you'd like
Maybe a check before reflect is run?
Is your feature request related to a problem? Please describe.
It would be nice if
Returning
function could be nil and if so act is if it's not there.I use your (awesome) library as a helper func to build queries across my application. In some cases I want to return values like an id or the whole updated row, but then sometimes I don't need to. It doesn't make a lot of sense to create additional logic just for a
Returning
stmt.Note: The desired behavior works if the
Returning
func isn't passed any values.Returning()
but if you pass it the value ofnil
it panics (because of reflect). As a result since this returning clause is in a helper func it will always be passed some value, even if it's just nil.Describe the solution you'd like
Maybe a check before reflect is run?
The text was updated successfully, but these errors were encountered: