fix: some api bug
This commit is contained in:
@@ -69,20 +69,6 @@ func (_u *WalletTransactionsUpdate) SetNillableCreatedAt(v *time.Time) *WalletTr
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSearchText sets the "search_text" field.
|
||||
func (_u *WalletTransactionsUpdate) SetSearchText(v string) *WalletTransactionsUpdate {
|
||||
_u.mutation.SetSearchText(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableSearchText sets the "search_text" field if the given value is not nil.
|
||||
func (_u *WalletTransactionsUpdate) SetNillableSearchText(v *string) *WalletTransactionsUpdate {
|
||||
if v != nil {
|
||||
_u.SetSearchText(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// Mutation returns the WalletTransactionsMutation object of the builder.
|
||||
func (_u *WalletTransactionsUpdate) Mutation() *WalletTransactionsMutation {
|
||||
return _u.mutation
|
||||
@@ -138,8 +124,8 @@ func (_u *WalletTransactionsUpdate) sqlSave(ctx context.Context) (_node int, err
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(wallettransactions.FieldCreatedAt, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SearchText(); ok {
|
||||
_spec.SetField(wallettransactions.FieldSearchText, field.TypeString, value)
|
||||
if _u.mutation.SearchTextCleared() {
|
||||
_spec.ClearField(wallettransactions.FieldSearchText, field.TypeString)
|
||||
}
|
||||
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
@@ -201,20 +187,6 @@ func (_u *WalletTransactionsUpdateOne) SetNillableCreatedAt(v *time.Time) *Walle
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSearchText sets the "search_text" field.
|
||||
func (_u *WalletTransactionsUpdateOne) SetSearchText(v string) *WalletTransactionsUpdateOne {
|
||||
_u.mutation.SetSearchText(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableSearchText sets the "search_text" field if the given value is not nil.
|
||||
func (_u *WalletTransactionsUpdateOne) SetNillableSearchText(v *string) *WalletTransactionsUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetSearchText(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// Mutation returns the WalletTransactionsMutation object of the builder.
|
||||
func (_u *WalletTransactionsUpdateOne) Mutation() *WalletTransactionsMutation {
|
||||
return _u.mutation
|
||||
@@ -300,8 +272,8 @@ func (_u *WalletTransactionsUpdateOne) sqlSave(ctx context.Context) (_node *Wall
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(wallettransactions.FieldCreatedAt, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SearchText(); ok {
|
||||
_spec.SetField(wallettransactions.FieldSearchText, field.TypeString, value)
|
||||
if _u.mutation.SearchTextCleared() {
|
||||
_spec.ClearField(wallettransactions.FieldSearchText, field.TypeString)
|
||||
}
|
||||
_node = &WalletTransactions{config: _u.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
|
||||
Reference in New Issue
Block a user