Skip to content

Commit f231190

Browse files
committed
document the method in the README
1 parent b0b3884 commit f231190

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ Specify a different batch size (100 by default):
5353
Cat.batch_update(cats, columns: :all, batch_size: 1000)
5454
```
5555

56+
Generate the relevant SQL statements:
57+
```ruby
58+
Cat.batch_update_statements([{id: 1, name: 'Lilly'}, {id: 2, name: 'John'}]).each do |query|
59+
Cat.connection.execute(query)
60+
end
61+
```
62+
5663
## License
5764
MIT

0 commit comments

Comments
 (0)