Rubocop - Enforce PostgreSQL Cursor usage
Enforces the use of each_instance
over find_each
, so that all batching is done with the postgresql_cursor gem.
Supports auto-correct!
Installation
Add this line to your application's Gemfile:
gem 'rubocop-postgresql_cursor'
And then execute:
$ bundle
Add the following line to rubocop.yml
:
require:
- rubocop-postgresql_cursor
Contributing
- Fork it ( https://github.com/tijmenb/rubocop-postgres_cursor/fork )
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create a new Pull Request