mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-04 11:32:28 +00:00
chore: bump all go deps (#507)
* bump all deps
* run code-gen
Former-commit-id: a042496c71
This commit is contained in:
parent
feab9f4c46
commit
a3e607a887
96 changed files with 1651 additions and 491 deletions
|
@ -23,7 +23,7 @@ import (
|
|||
type UserQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []user.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.User
|
||||
withGroup *GroupQuery
|
||||
|
@ -61,7 +61,7 @@ func (uq *UserQuery) Unique(unique bool) *UserQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery {
|
||||
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery {
|
||||
uq.order = append(uq.order, o...)
|
||||
return uq
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ func (uq *UserQuery) Clone() *UserQuery {
|
|||
return &UserQuery{
|
||||
config: uq.config,
|
||||
ctx: uq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, uq.order...),
|
||||
order: append([]user.OrderOption{}, uq.order...),
|
||||
inters: append([]Interceptor{}, uq.inters...),
|
||||
predicates: append([]predicate.User{}, uq.predicates...),
|
||||
withGroup: uq.withGroup.Clone(),
|
||||
|
@ -542,7 +542,7 @@ func (uq *UserQuery) loadAuthTokens(ctx context.Context, query *AuthTokensQuery,
|
|||
}
|
||||
query.withFKs = true
|
||||
query.Where(predicate.AuthTokens(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(user.AuthTokensColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(user.AuthTokensColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -555,7 +555,7 @@ func (uq *UserQuery) loadAuthTokens(ctx context.Context, query *AuthTokensQuery,
|
|||
}
|
||||
node, ok := nodeids[*fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "user_auth_tokens" returned %v for node %v`, *fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "user_auth_tokens" returned %v for node %v`, *fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
@ -571,8 +571,11 @@ func (uq *UserQuery) loadNotifiers(ctx context.Context, query *NotifierQuery, no
|
|||
init(nodes[i])
|
||||
}
|
||||
}
|
||||
if len(query.ctx.Fields) > 0 {
|
||||
query.ctx.AppendFieldOnce(notifier.FieldUserID)
|
||||
}
|
||||
query.Where(predicate.Notifier(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(user.NotifiersColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(user.NotifiersColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -582,7 +585,7 @@ func (uq *UserQuery) loadNotifiers(ctx context.Context, query *NotifierQuery, no
|
|||
fk := n.UserID
|
||||
node, ok := nodeids[fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "user_id" returned %v for node %v`, fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "user_id" returned %v for node %v`, fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue