mirror of https://github.com/go-gorm/gorm.git
simplify clone
This commit is contained in:
parent
5aca010140
commit
681aa90995
21
search.go
21
search.go
|
@ -24,25 +24,8 @@ type search struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *search) clone() *search {
|
func (s *search) clone() *search {
|
||||||
return &search{
|
clone := *s
|
||||||
preload: s.preload,
|
return &clone
|
||||||
whereConditions: s.whereConditions,
|
|
||||||
orConditions: s.orConditions,
|
|
||||||
notConditions: s.notConditions,
|
|
||||||
havingCondition: s.havingCondition,
|
|
||||||
initAttrs: s.initAttrs,
|
|
||||||
assignAttrs: s.assignAttrs,
|
|
||||||
selects: s.selects,
|
|
||||||
omits: s.omits,
|
|
||||||
orders: s.orders,
|
|
||||||
joins: s.joins,
|
|
||||||
offset: s.offset,
|
|
||||||
limit: s.limit,
|
|
||||||
group: s.group,
|
|
||||||
tableName: s.tableName,
|
|
||||||
raw: s.raw,
|
|
||||||
Unscoped: s.Unscoped,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *search) Where(query interface{}, values ...interface{}) *search {
|
func (s *search) Where(query interface{}, values ...interface{}) *search {
|
||||||
|
|
Loading…
Reference in New Issue