MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Clone

Method Clone

ent/setting_query.go:242–256  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected