MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / Clone

Method Clone

ent/gitcommit_query.go:271–287  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
271func (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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected