New returns a new Selector with the same dialect and context.
()
| 1697 | |
| 1698 | // New returns a new Selector with the same dialect and context. |
| 1699 | func (s *Selector) New() *Selector { |
| 1700 | c := Dialect(s.dialect).Select() |
| 1701 | if s.ctx != nil { |
| 1702 | c = c.WithContext(s.ctx) |
| 1703 | } |
| 1704 | return c |
| 1705 | } |
| 1706 | |
| 1707 | // WithContext sets the context into the *Selector. |
| 1708 | func (s *Selector) WithContext(ctx context.Context) *Selector { |