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

Method defaults

ent/gitcommit_create.go:191–204  ·  view source on GitHub ↗

defaults sets the default values of the builder before save.

()

Source from the content-addressed store, hash-verified

189
190// defaults sets the default values of the builder before save.
191func (gcc *GitCommitCreate) defaults() {
192 if _, ok := gcc.mutation.CreateTime(); !ok {
193 v := gitcommit.DefaultCreateTime()
194 gcc.mutation.SetCreateTime(v)
195 }
196 if _, ok := gcc.mutation.UpdateTime(); !ok {
197 v := gitcommit.DefaultUpdateTime()
198 gcc.mutation.SetUpdateTime(v)
199 }
200 if _, ok := gcc.mutation.ID(); !ok {
201 v := gitcommit.DefaultID()
202 gcc.mutation.SetID(v)
203 }
204}
205
206// check runs all checks and user-defined validators on the builder.
207func (gcc *GitCommitCreate) check() error {

Callers 2

SaveMethod · 0.95
SaveMethod · 0.45

Calls 6

CreateTimeMethod · 0.45
SetCreateTimeMethod · 0.45
UpdateTimeMethod · 0.45
SetUpdateTimeMethod · 0.45
IDMethod · 0.45
SetIDMethod · 0.45

Tested by

no test coverage detected