Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
(unique bool)
| 50 | // Unique configures the query builder to filter duplicate records on query. |
| 51 | // By default, unique is set to true, and can be disabled using this method. |
| 52 | func (_q *MetaQuery) Unique(unique bool) *MetaQuery { |
| 53 | _q.ctx.Unique = &unique |
| 54 | return _q |
| 55 | } |
| 56 | |
| 57 | // Order specifies how the records should be ordered. |
| 58 | func (_q *MetaQuery) Order(o ...meta.OrderOption) *MetaQuery { |