add return ErrMultiRows
This commit is contained in:
@@ -200,6 +200,10 @@ func (o *querySet) One(container interface{}, cols ...string) error {
|
||||
if num == 0 {
|
||||
return ErrNoRows
|
||||
}
|
||||
|
||||
if num > 1 {
|
||||
return ErrMultiRows
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user