Method modifies receiver RVV-B0006
Bug risk
Major
6 months ago3 years old
suspicious assignment to a by-value method receiver
379
380// aggregate func
381func (o querySet) Aggregate(s string) QuerySeter {
382	o.aggregate = s383	return &o
384}
suspicious assignment to a by-value method receiver
216
217// Set condition to QuerySeter.
218func (o querySet) SetCond(cond *Condition) QuerySeter {
219	o.cond = cond220	return &o
221}
222
suspicious assignment to a by-value method receiver
205			case string:
206				o.related = append(o.related, val)
207			case int:
208				o.relDepth = val209			default:
210				panic(fmt.Errorf("<QuerySeter.RelatedSel> wrong param kind: %v", val))
211			}
suspicious assignment to a by-value method receiver
198// it will query relation models and assign to parent model.
199func (o querySet) RelatedSel(params ...interface{}) QuerySeter {
200	if len(params) == 0 {
201		o.relDepth = DefaultRelsDepth202	} else {
203		for _, p := range params {
204			switch val := p.(type) {
suspicious assignment to a by-value method receiver
189
190// IgnoreIndex ignore index for query
191func (o querySet) IgnoreIndex(indexes ...string) QuerySeter {
192	o.useIndex = hints.KeyIgnoreIndex193	o.indexes = indexes
194	return &o
195}