1
0
forked from ALHP/ALHP.GO

updated deps; regen ent

This commit is contained in:
2023-11-20 16:18:03 +01:00
parent 552382cc00
commit 0c6a96db21
5 changed files with 44 additions and 23 deletions

View File

@@ -28,9 +28,7 @@ type Client struct {
// NewClient creates a new client configured with the given options.
func NewClient(opts ...Option) *Client {
cfg := config{log: log.Println, hooks: &hooks{}, inters: &inters{}}
cfg.options(opts...)
client := &Client{config: cfg}
client := &Client{config: newConfig(opts...)}
client.init()
return client
}
@@ -58,6 +56,13 @@ type (
Option func(*config)
)
// newConfig creates a new config for the client.
func newConfig(opts ...Option) config {
cfg := config{log: log.Println, hooks: &hooks{}, inters: &inters{}}
cfg.options(opts...)
return cfg
}
// options applies the options on the config object.
func (c *config) options(opts ...Option) {
for _, opt := range opts {

View File

@@ -94,6 +94,14 @@ func (dpu *DBPackageUpdate) SetRepository(d dbpackage.Repository) *DBPackageUpda
return dpu
}
// SetNillableRepository sets the "repository" field if the given value is not nil.
func (dpu *DBPackageUpdate) SetNillableRepository(d *dbpackage.Repository) *DBPackageUpdate {
if d != nil {
dpu.SetRepository(*d)
}
return dpu
}
// SetVersion sets the "version" field.
func (dpu *DBPackageUpdate) SetVersion(s string) *DBPackageUpdate {
dpu.mutation.SetVersion(s)
@@ -695,6 +703,14 @@ func (dpuo *DBPackageUpdateOne) SetRepository(d dbpackage.Repository) *DBPackage
return dpuo
}
// SetNillableRepository sets the "repository" field if the given value is not nil.
func (dpuo *DBPackageUpdateOne) SetNillableRepository(d *dbpackage.Repository) *DBPackageUpdateOne {
if d != nil {
dpuo.SetRepository(*d)
}
return dpuo
}
// SetVersion sets the "version" field.
func (dpuo *DBPackageUpdateOne) SetVersion(s string) *DBPackageUpdateOne {
dpuo.mutation.SetVersion(s)

View File

@@ -5,6 +5,6 @@ package runtime
// The schema-stitching logic is generated in somegit.dev/ALHP/ALHP.GO/ent/runtime.go
const (
Version = "v0.12.4" // Version of ent codegen.
Sum = "h1:LddPnAyxls/O7DTXZvUGDj0NZIdGSu317+aoNLJWbD8=" // Sum of ent codegen.
Version = "v0.12.5" // Version of ent codegen.
Sum = "h1:KREM5E4CSoej4zeGa88Ou/gfturAnpUv0mzAjch1sj4=" // Sum of ent codegen.
)