Skip to content

Commit

Permalink
fix(perform): Correcting logic to perform patching (#31)
Browse files Browse the repository at this point in the history
Correcting loging to perform patching
  • Loading branch information
Jacobbrewer1 authored Oct 12, 2024
1 parent 76902dc commit ed28cc3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ func (s *SQLPatch) PerformPatch() (sql.Result, error) {
return nil, fmt.Errorf("validate perform patch: %w", err)
}

return s.db.Exec(s.GenerateSQL())
sqlStr, args, err := s.GenerateSQL()
if err != nil {
return nil, fmt.Errorf("generate SQL: %w", err)
}

return s.db.Exec(sqlStr, args...)
}

func NewDiffSQLPatch[T any](old, newT *T, opts ...PatchOpt) (*SQLPatch, error) {
Expand Down

0 comments on commit ed28cc3

Please sign in to comment.