diff --git a/CHANGELOG.md b/CHANGELOG.md index 448bc12..228cac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [2.6.0](https://github.com/tsuwatch/nazrin/compare/v2.5.0...v2.6.0) + +### Features: + +* Implement batch operation [#27](https://github.com/tsuwatch/nazrin/pull/27) - [@AMHOL](https://github.com/AMHOL) + ## [2.5.0](https://github.com/tsuwatch/nazrin/compare/v2.4.0...v2.5.0) ### Features: diff --git a/README.md b/README.md index 996a3a7..b062160 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ class Post < ActiveRecord::Base end ``` +### `.search` ```ruby result = Post.search(where: :foo, includes: :bar).size(1).start(0).query("(and 'content')").query_parser('structured').execute => [#] @@ -76,6 +77,20 @@ result.facets => {} ``` +### `.batch_operation` +```ruby +post1 = Post.create +post2 = Post.create +post3 = Post.create +post3.destroy + +Post.batch_operation( + add: [post1, post2], + delete: [post3] +) +``` + + ### Supported pagination libraries If you want to use other supported pagination libraries, for example, `nazrin-kaminari` generates `Kaminari::PaginatableArray` instead of `Nazrin::PaginatedArray`. diff --git a/lib/nazrin/version.rb b/lib/nazrin/version.rb index 8cd488a..bd51082 100644 --- a/lib/nazrin/version.rb +++ b/lib/nazrin/version.rb @@ -1,3 +1,3 @@ module Nazrin - VERSION = '2.5.0' + VERSION = '2.6.0' end