Skip to content

Commit

Permalink
feat: simplify building of UPDATE clause
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Oct 2, 2024
1 parent d3db367 commit 4c36837
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ethtxmanager/sqlstorage/sqlstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ func (s *SqlStorage) Update(ctx context.Context, mTx types.MonitoredTx) error {
}

// Add the WHERE clause for the primary key
builder.WriteString(" WHERE id = $")
builder.WriteString(strconv.Itoa(len(columns)))
builder.WriteString(" WHERE id = $" + strconv.Itoa(len(columns)))

query := builder.String()

Expand Down

0 comments on commit 4c36837

Please sign in to comment.