New returns new zero Query bound to the current db.
()
| 99 | |
| 100 | // New returns new zero Query bound to the current db. |
| 101 | func (q *Query) New() *Query { |
| 102 | clone := &Query{ |
| 103 | ctx: q.ctx, |
| 104 | db: q.db, |
| 105 | |
| 106 | model: q.model, |
| 107 | tableModel: cloneTableModelJoins(q.tableModel), |
| 108 | flags: q.flags, |
| 109 | } |
| 110 | return clone.withFlag(implicitModelFlag) |
| 111 | } |
| 112 | |
| 113 | // Clone clones the Query. |
| 114 | func (q *Query) Clone() *Query { |