mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-04 03:22:28 +00:00
chore: developer cleanup (#300)
* new PR tasks * add homebox to know words * formatting * bump deps * generate db models * ts errors * drop id * fix accessor * drop unused time field * change CI * add expected error * add type check * resolve serveral type errors * hoise in CI
This commit is contained in:
parent
88f9ff90d4
commit
bd321af29f
142 changed files with 817 additions and 1200 deletions
|
@ -204,16 +204,7 @@ func (lu *LabelUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
if err := lu.check(); err != nil {
|
||||
return n, err
|
||||
}
|
||||
_spec := &sqlgraph.UpdateSpec{
|
||||
Node: &sqlgraph.NodeSpec{
|
||||
Table: label.Table,
|
||||
Columns: label.Columns,
|
||||
ID: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUUID,
|
||||
Column: label.FieldID,
|
||||
},
|
||||
},
|
||||
}
|
||||
_spec := sqlgraph.NewUpdateSpec(label.Table, label.Columns, sqlgraph.NewFieldSpec(label.FieldID, field.TypeUUID))
|
||||
if ps := lu.mutation.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
|
@ -458,6 +449,12 @@ func (luo *LabelUpdateOne) RemoveItems(i ...*Item) *LabelUpdateOne {
|
|||
return luo.RemoveItemIDs(ids...)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the LabelUpdate builder.
|
||||
func (luo *LabelUpdateOne) Where(ps ...predicate.Label) *LabelUpdateOne {
|
||||
luo.mutation.Where(ps...)
|
||||
return luo
|
||||
}
|
||||
|
||||
// Select allows selecting one or more fields (columns) of the returned entity.
|
||||
// The default is selecting all fields defined in the entity schema.
|
||||
func (luo *LabelUpdateOne) Select(field string, fields ...string) *LabelUpdateOne {
|
||||
|
@ -528,16 +525,7 @@ func (luo *LabelUpdateOne) sqlSave(ctx context.Context) (_node *Label, err error
|
|||
if err := luo.check(); err != nil {
|
||||
return _node, err
|
||||
}
|
||||
_spec := &sqlgraph.UpdateSpec{
|
||||
Node: &sqlgraph.NodeSpec{
|
||||
Table: label.Table,
|
||||
Columns: label.Columns,
|
||||
ID: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUUID,
|
||||
Column: label.FieldID,
|
||||
},
|
||||
},
|
||||
}
|
||||
_spec := sqlgraph.NewUpdateSpec(label.Table, label.Columns, sqlgraph.NewFieldSpec(label.FieldID, field.TypeUUID))
|
||||
id, ok := luo.mutation.ID()
|
||||
if !ok {
|
||||
return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Label.id" for update`)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue