Clone returns a duplicate of the SettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
()
| 240 | // Clone returns a duplicate of the SettingQuery builder, including all associated steps. It can be |
| 241 | // used to prepare common query builders and use them differently after the clone is made. |
| 242 | func (sq *SettingQuery) Clone() *SettingQuery { |
| 243 | if sq == nil { |
| 244 | return nil |
| 245 | } |
| 246 | return &SettingQuery{ |
| 247 | config: sq.config, |
| 248 | ctx: sq.ctx.Clone(), |
| 249 | order: append([]setting.OrderOption{}, sq.order...), |
| 250 | inters: append([]Interceptor{}, sq.inters...), |
| 251 | predicates: append([]predicate.Setting{}, sq.predicates...), |
| 252 | // clone intermediate query. |
| 253 | sql: sq.sql.Clone(), |
| 254 | path: sq.path, |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | // GroupBy is used to group vertices by one or more fields/columns. |
| 259 | // It is often used with aggregate functions, like: count, max, mean, min, sum. |
nothing calls this directly
no outgoing calls
no test coverage detected