simplify clone

This commit is contained in:
bom_d_van 2015-04-16 17:36:55 +08:00
parent 5aca010140
commit 681aa90995
1 changed files with 2 additions and 19 deletions

View File

@ -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 {