Skip to content

0.5.0

Compare
Choose a tag to compare
@palkan palkan released this 07 Sep 15:53
· 40 commits to master since this release

Changes

This release stops support for EOL Ruby versions. Now Ruby 2.5+ is required.

Features

  • Added location to SQLs in verbose mode.

Now you can see which location in your source code triggered a query.
To change the number of backtrace lines to display (1 by default), use NPLUSONE_BACKTRACE env var or
NPlusOneControl.backtrace_length configuration parameter.

  • Added ability to truncate queries in verbose mode.

You can specify the length limit for displayed queries via NPLUSONE_TRUNCATE env var or NPlusOneControl.truncate_query_size configuration parameter.

  • Added ability to pass default filter via NPLUSONE_FILTER env var.

It's useful when you want to narrow verbose output only to the affected table(-s) and remove all the other queries.
For example, NPLUSONE_FILTER=users bundle exec rake test.