MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Clone

Method Clone

app/controlplane/pkg/data/ent/user_query.go:295–312  ·  view source on GitHub ↗

Clone returns a duplicate of the UserQuery 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

293// Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be
294// used to prepare common query builders and use them differently after the clone is made.
295func (_q *UserQuery) Clone() *UserQuery {
296 if _q == nil {
297 return nil
298 }
299 return &UserQuery{
300 config: _q.config,
301 ctx: _q.ctx.Clone(),
302 order: append([]user.OrderOption{}, _q.order...),
303 inters: append([]Interceptor{}, _q.inters...),
304 predicates: append([]predicate.User{}, _q.predicates...),
305 withMemberships: _q.withMemberships.Clone(),
306 withGroupMemberships: _q.withGroupMemberships.Clone(),
307 // clone intermediate query.
308 sql: _q.sql.Clone(),
309 path: _q.path,
310 modifiers: append([]func(*sql.Selector){}, _q.modifiers...),
311 }
312}
313
314// WithMemberships tells the query-builder to eager-load the nodes that are connected to
315// the "memberships" edge. The optional arguments are used to configure the query builder of the edge.

Callers 3

applyGroupGateFunction · 0.45
syncRBACRolesFunction · 0.45
verifyMaterialFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected