Clone returns a duplicate of the GitCommitQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
()
| 269 | // Clone returns a duplicate of the GitCommitQuery builder, including all associated steps. It can be |
| 270 | // used to prepare common query builders and use them differently after the clone is made. |
| 271 | func (gcq *GitCommitQuery) Clone() *GitCommitQuery { |
| 272 | if gcq == nil { |
| 273 | return nil |
| 274 | } |
| 275 | return &GitCommitQuery{ |
| 276 | config: gcq.config, |
| 277 | ctx: gcq.ctx.Clone(), |
| 278 | order: append([]gitcommit.OrderOption{}, gcq.order...), |
| 279 | inters: append([]Interceptor{}, gcq.inters...), |
| 280 | predicates: append([]predicate.GitCommit{}, gcq.predicates...), |
| 281 | withResults: gcq.withResults.Clone(), |
| 282 | // clone intermediate query. |
| 283 | sql: gcq.sql.Clone(), |
| 284 | path: gcq.path, |
| 285 | modifiers: append([]func(*sql.Selector){}, gcq.modifiers...), |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | // WithResults tells the query-builder to eager-load the nodes that are connected to |
| 290 | // the "results" edge. The optional arguments are used to configure the query builder of the edge. |
nothing calls this directly
no outgoing calls
no test coverage detected