Skip to content

Commit

Permalink
README: columns argument is mandatory (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
quentindemetz authored Oct 17, 2024
1 parent cfc010d commit 80fe3d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cat1.birthday = '2024-01-01'
cat2.birthday = '2024-06-06'
cat3.birthday = '1900-01-01'

Cat.batch_update([cat1, cat2, cat3]) # issues a single SQL query
Cat.batch_update([cat1, cat2, cat3], columns: :all) # issues a single SQL query
```

The SQL query looks like the following:
Expand Down Expand Up @@ -45,12 +45,12 @@ Ignore model validations (all validations run by default):
```ruby
cat1.name = ''
cat2.name = ''
Cat.batch_update([cat1, cat2], validate: false)
Cat.batch_update([cat1, cat2], columns: :all, validate: false)
```

Specify a different batch size (100 by default):
```
Cat.batch_update(cats, batch_size: 1000)
```ruby
Cat.batch_update(cats, columns: :all, batch_size: 1000)
```

## License
Expand Down

0 comments on commit 80fe3d6

Please sign in to comment.